com.sun.xml.ws.commons
Class Logger

java.lang.Object
  extended by com.sun.xml.ws.commons.Logger

public final class Logger
extends java.lang.Object

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)
           
<T extends java.lang.Throwable>
T
logException(T exception, boolean logCause, java.util.logging.Level level)
          Method logs exception's message at the logging level specified by the level argument.
<T extends java.lang.Throwable>
T
logException(T exception, java.util.logging.Level level)
          Same as logException(exception, true, level).
<T extends java.lang.Throwable>
T
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.
<T extends java.lang.Throwable>
T
logSevereException(T exception)
          Same as logSevereException(exception, true).
<T extends java.lang.Throwable>
T
logSevereException(T exception, boolean logCause)
          Method logs exception's message as a SEVERE logging level message.
<T extends java.lang.Throwable>
T
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

getLogger

@NotNull
public static Logger getLogger(@NotNull
                                       java.lang.Class<?> componentClass)
The factory method returns preconfigured RmLogger 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.
Returns:
logger instance preconfigured for use with the component
Throws:
java.lang.NullPointerException - if the componentClass parameter is null.

log

public void log(java.util.logging.Level level,
                java.lang.String message)

log

public void log(java.util.logging.Level level,
                java.lang.String message,
                java.lang.Throwable thrown)

finest

public void finest(java.lang.String message)

finest

public void finest(java.lang.String message,
                   java.lang.Throwable thrown)

finer

public void finer(java.lang.String message)

finer

public void finer(java.lang.String message,
                  java.lang.Throwable thrown)

fine

public void fine(java.lang.String message)

fine

public void fine(java.lang.String message,
                 java.lang.Throwable thrown)

info

public void info(java.lang.String message)

info

public void info(java.lang.String message,
                 java.lang.Throwable thrown)

config

public void config(java.lang.String message)

config

public void config(java.lang.String message,
                   java.lang.Throwable thrown)

warning

public void warning(java.lang.String message)

warning

public void warning(java.lang.String message,
                    java.lang.Throwable thrown)

severe

public void severe(java.lang.String message)

severe

public void severe(java.lang.String message,
                   java.lang.Throwable thrown)

isMethodCallLoggable

public boolean isMethodCallLoggable()

isLoggable

public boolean isLoggable(java.util.logging.Level level)

setLevel

public void setLevel(java.util.logging.Level level)

entering

public void entering()

entering

public void entering(java.lang.Object... parameters)

exiting

public void exiting()

exiting

public void exiting(java.lang.Object result)

logSevereException

public <T extends java.lang.Throwable> T logSevereException(T exception,
                                                            java.lang.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. 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.
Returns:
the same exception instance that was passed in as the exception parameter.

logSevereException

public <T extends java.lang.Throwable> 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). 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.

Parameters:
exception - exception whose message should be logged. Must not be null.
logCause - deterimnes whether initial cause of the exception should be logged as well
Returns:
the same exception instance that was passed in as the exception parameter.

logSevereException

public <T extends java.lang.Throwable> T logSevereException(T exception)
Same as logSevereException(exception, true).


logException

public <T extends java.lang.Throwable> T 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.

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.
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
Returns:
the same exception instance that was passed in as the exception parameter.

logException

public <T extends java.lang.Throwable> T logException(T exception,
                                                      boolean logCause,
                                                      java.util.logging.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). 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.

Parameters:
exception - exception whose message should be logged. Must not be null.
logCause - deterimnes whether initial cause of the exception should be logged as well
level - loging level which should be used for logging
Returns:
the same exception instance that was passed in as the exception parameter.

logException

public <T extends java.lang.Throwable> T logException(T exception,
                                                      java.util.logging.Level level)
Same as logException(exception, true, level).