| java.lang.Object com.sun.xml.ws.policy.privateutil.PolicyLogger
PolicyLogger | final public class PolicyLogger (Code) | | This is a helper class that provides some conveniece methods wrapped around the
standard
java.util.logging.Logger interface.
author: Marek Potociar |
Method Summary | |
public void | config(String message) | public void | config(String message, Throwable thrown) | public void | entering() | public void | entering(Object... parameters) | public void | exiting() | public void | exiting(Object result) | public void | fine(String message) | public void | fine(String message, Throwable thrown) | public void | finer(String message) | public void | finer(String message, Throwable thrown) | public void | finest(String message) | public void | finest(String message, Throwable thrown) | public static PolicyLogger | getLogger(Class componentClass) The factory method returns preconfigured PolicyLogger wrapper for the class. | public void | info(String message) | public void | info(String message, Throwable thrown) | public boolean | isLoggable(Level level) | public boolean | isMethodCallLoggable() | public void | log(Level level, String message) | public void | log(Level level, String message, Throwable thrown) | public T | logException(T exception, Throwable cause, Level level) Method logs
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.
Parameters: exception - exception whose message should be logged. | public T | logException(T exception, boolean logCause, Level level) Method logs
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). | public T | logException(T exception, Level level) Same as
PolicyLogger.logException(Throwable,Throwable,Level) logException(exception, true, level) . | public T | logSevereException(T exception, Throwable cause) Method logs
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.
Parameters: exception - exception whose message should be logged. | public T | logSevereException(T exception, boolean logCause) Method logs
exception 's message as a
SEVERE logging level
message.
If
logCause parameter is
true ,
exception 's original
cause is logged as well (if exists). | public T | logSevereException(T exception) Same as
PolicyLogger.logSevereException(Throwable,boolean) logSevereException(exception, true) . | public void | setLevel(Level level) | public void | severe(String message) | public void | severe(String message, Throwable thrown) | public void | warning(String message) | public void | warning(String message, Throwable thrown) |
entering | public void entering()(Code) | | |
exiting | public void exiting()(Code) | | |
getLogger | public static PolicyLogger getLogger(Class componentClass)(Code) | | The factory method returns preconfigured PolicyLogger wrapper for the class. Since there is no caching implemented,
it is advised that the method is called only once per a class in order to initialize a final static logger variable,
which is then used through the class to perform actual logging tasks.
Parameters: componentClass - class of the component that will use the logger instance. Must not be null . logger instance preconfigured for use with the component throws: NullPointerException - if the componentClass parameter is null . |
isMethodCallLoggable | public boolean isMethodCallLoggable()(Code) | | |
logException | public T logException(T exception, Throwable cause, Level level)(Code) | | Method logs
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.
Parameters: exception - exception whose message should be logged. Must not be null . Parameters: cause - initial cause of the exception that should be logged as welland set as exception 's original cause. May be null . Parameters: level - loging level which should be used for logging the same exception instance that was passed in as the exception parameter. |
logException | public T logException(T exception, boolean logCause, Level level)(Code) | | Method logs
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
PolicyLogger.logException(Throwable,Throwable,Level) logException(exception, cause, level) method version but you might still want to log the original cause as well.
Parameters: exception - exception whose message should be logged. Must not be null . Parameters: logCause - deterimnes whether initial cause of the exception shouldbe logged as well Parameters: level - loging level which should be used for logging the same exception instance that was passed in as the exception parameter. |
logSevereException | public T logSevereException(T exception, Throwable cause)(Code) | | Method logs
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.
Parameters: exception - exception whose message should be logged. Must not be null . Parameters: cause - initial cause of the exception that should be logged as welland set as exception 's original cause. May be null . the same exception instance that was passed in as the exception parameter. |
logSevereException | public T logSevereException(T exception, boolean logCause)(Code) | | Method logs
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
PolicyLogger.logSevereException(Throwable,Throwable) method version but you might still want to log the original cause as well.
Parameters: exception - exception whose message should be logged. Must not be null . Parameters: logCause - deterimnes whether initial cause of the exception shouldbe logged as well the same exception instance that was passed in as the exception parameter. |
|
|