withLogger(Logger l, Runnable r) Call a runnable in the dynamic context of a particular logger.
Anyone within that context can call
Logging.currentLogger() to get access to an appropriate logger instance.
If no such instance has been installed, will use a generic
logger with the name "Default".
Return the Logger currently in-force in the current thread, as set
by
Logging.withLogger(Logger,Runnable) .
the current logger or the value returned by defaultLogger(). This method willnever return null. See Also:Logging.hasLogger()
defaultLogger
public static synchronized Logger defaultLogger()(Code)
Returns the default Logger instance - the value returned by
Logging.currentLogger() if there is no active context.
Call a runnable in the dynamic context of a particular logger.
Anyone within that context can call
Logging.currentLogger() to get access to an appropriate logger instance.
If no such instance has been installed, will use a generic
logger with the name "Default". This value may be retrieved
by calling
Logging.defaultLogger() .