|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.sun.xml.ws.commons.Logger
public final class Logger
This is a helper class that provides some conveniece methods wrapped around the
standard Logger
interface.
The class also makes sure that logger names of each Metro subsystem are consistent
with each other.
Method Summary | ||
---|---|---|
void |
config(java.lang.String message)
|
|
void |
config(java.lang.String message,
java.lang.Throwable thrown)
|
|
void |
entering()
|
|
void |
entering(java.lang.Object... parameters)
|
|
void |
exiting()
|
|
void |
exiting(java.lang.Object result)
|
|
void |
fine(java.lang.String message)
|
|
void |
fine(java.lang.String message,
java.lang.Throwable thrown)
|
|
void |
finer(java.lang.String message)
|
|
void |
finer(java.lang.String message,
java.lang.Throwable thrown)
|
|
void |
finest(java.lang.String message)
|
|
void |
finest(java.lang.String message,
java.lang.Throwable thrown)
|
|
static Logger |
getLogger(java.lang.Class<?> componentClass)
The factory method returns preconfigured RmLogger wrapper for the class. |
|
void |
info(java.lang.String message)
|
|
void |
info(java.lang.String message,
java.lang.Throwable thrown)
|
|
boolean |
isLoggable(java.util.logging.Level level)
|
|
boolean |
isMethodCallLoggable()
|
|
void |
log(java.util.logging.Level level,
java.lang.String message)
|
|
void |
log(java.util.logging.Level level,
java.lang.String message,
java.lang.Throwable thrown)
|
|
|
logException(T exception,
boolean logCause,
java.util.logging.Level level)
Method logs exception 's message at the logging level specified by the
level argument. |
|
|
logException(T exception,
java.util.logging.Level level)
Same as logException(exception, true, level) . |
|
|
logException(T exception,
java.lang.Throwable cause,
java.util.logging.Level level)
Method logs exception 's message at the logging level specified by the
level argument. |
|
|
logSevereException(T exception)
Same as logSevereException(exception, true) . |
|
|
logSevereException(T exception,
boolean logCause)
Method logs exception 's message as a SEVERE logging level
message. |
|
|
logSevereException(T exception,
java.lang.Throwable cause)
Method logs exception 's message as a SEVERE logging level
message. |
|
void |
setLevel(java.util.logging.Level level)
|
|
void |
severe(java.lang.String message)
|
|
void |
severe(java.lang.String message,
java.lang.Throwable thrown)
|
|
void |
warning(java.lang.String message)
|
|
void |
warning(java.lang.String message,
java.lang.Throwable thrown)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
@NotNull public static Logger getLogger(@NotNull java.lang.Class<?> componentClass)
componentClass
- class of the component that will use the logger instance. Must not be null
.
java.lang.NullPointerException
- if the componentClass parameter is null
.public void log(java.util.logging.Level level, java.lang.String message)
public void log(java.util.logging.Level level, java.lang.String message, java.lang.Throwable thrown)
public void finest(java.lang.String message)
public void finest(java.lang.String message, java.lang.Throwable thrown)
public void finer(java.lang.String message)
public void finer(java.lang.String message, java.lang.Throwable thrown)
public void fine(java.lang.String message)
public void fine(java.lang.String message, java.lang.Throwable thrown)
public void info(java.lang.String message)
public void info(java.lang.String message, java.lang.Throwable thrown)
public void config(java.lang.String message)
public void config(java.lang.String message, java.lang.Throwable thrown)
public void warning(java.lang.String message)
public void warning(java.lang.String message, java.lang.Throwable thrown)
public void severe(java.lang.String message)
public void severe(java.lang.String message, java.lang.Throwable thrown)
public boolean isMethodCallLoggable()
public boolean isLoggable(java.util.logging.Level level)
public void setLevel(java.util.logging.Level level)
public void entering()
public void entering(java.lang.Object... parameters)
public void exiting()
public void exiting(java.lang.Object result)
public <T extends java.lang.Throwable> T logSevereException(T exception, java.lang.Throwable cause)
exception
's message as a SEVERE
logging level
message.
If cause
parameter is not null
, it is logged as well and
exception
original cause is initialized with instance referenced
by cause
parameter.
exception
- exception whose message should be logged. Must not be
null
.cause
- initial cause of the exception that should be logged as well
and set as exception
's original cause. May be null
.
exception
parameter.public <T extends java.lang.Throwable> T logSevereException(T exception, boolean logCause)
exception
's message as a SEVERE
logging level
message.
If logCause
parameter is true
, exception
's original
cause is logged as well (if exists). This may be used in cases when
exception
's class provides constructor to initialize the original
cause. In such case you do not need to use
logSevereException(Throwable, Throwable)
method version but you might still want to log the original cause as well.
exception
- exception whose message should be logged. Must not be
null
.logCause
- deterimnes whether initial cause of the exception should
be logged as well
exception
parameter.public <T extends java.lang.Throwable> T logSevereException(T exception)
logSevereException(exception, true)
.
public <T extends java.lang.Throwable> T logException(T exception, java.lang.Throwable cause, java.util.logging.Level level)
exception
's message at the logging level specified by the
level
argument.
If cause
parameter is not null
, it is logged as well and
exception
original cause is initialized with instance referenced
by cause
parameter.
exception
- exception whose message should be logged. Must not be
null
.cause
- initial cause of the exception that should be logged as well
and set as exception
's original cause. May be null
.level
- loging level which should be used for logging
exception
parameter.public <T extends java.lang.Throwable> T logException(T exception, boolean logCause, java.util.logging.Level level)
exception
's message at the logging level specified by the
level
argument.
If logCause
parameter is true
, exception
's original
cause is logged as well (if exists). This may be used in cases when
exception
's class provides constructor to initialize the original
cause. In such case you do not need to use
logException(exception, cause, level)
method version but you might still want to log the original cause as well.
exception
- exception whose message should be logged. Must not be
null
.logCause
- deterimnes whether initial cause of the exception should
be logged as welllevel
- loging level which should be used for logging
exception
parameter.public <T extends java.lang.Throwable> T logException(T exception, java.util.logging.Level level)
logException(exception, true, level)
.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |