|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.fasterxml.uuid.Logger
com.fasterxml.uuid.ext.JavaUtilLogger
public class JavaUtilLogger
Simple wrapper that allows easy connecting of JUG logging into JDK 1.4+ logging implementation (aka "java.util.logging" aka "JUL".
Note: using this class requires JDK 1.4 or above.
Field Summary |
---|
Fields inherited from class com.fasterxml.uuid.Logger |
---|
_logLevel, _output1, _output2, LOG_ALL, LOG_ERROR_AND_ABOVE, LOG_INFO_AND_ABOVE, LOG_NOTHING, LOG_WARNING_AND_ABOVE |
Method Summary | |
---|---|
static void |
connectToJavaUtilLogging()
Static method to call to make JUG use a log4j proxy all of its logging through a j.u.l Logger constructed to correspond with
com.fasterxml.uuid.Logger class (this generally determines
j.u.l category output etc settings). |
static void |
connectToJavaUtilLogging(Logger peer)
Static method to call to make JUG use to proxy all of its logging through the specified j.u.l Logger instance. |
protected void |
doLogError(String msg)
|
protected void |
doLogInfo(String msg)
|
protected void |
doLogWarning(String msg)
|
protected void |
doSetOutput(PrintStream str)
Note: this method is meaningless with log4j, since it has more advanced output mapping and filtering mechanisms. |
protected void |
doSetOutput(Writer w)
Note: this method is meaningless with log4j, since it has more advanced output mapping and filtering mechanisms. |
Methods inherited from class com.fasterxml.uuid.Logger |
---|
doSetLogLevel, doWrite, isEnabled, logError, logInfo, logWarning, setLogger, setLogLevel, setOutput, setOutput |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void connectToJavaUtilLogging(Logger peer)
Logger
instance.
Method will create a simple wrapper, and call
Logger.setLogger(com.fasterxml.uuid.Logger)
with the wrapper as
the argument. This will then re-direct logging from the previously
defined Logger (which initially is the simple JUG logger) to the
new wrapper, which routes logging messages to the log4j peer Logger
instance.
public static void connectToJavaUtilLogging()
Logger
constructed to correspond with
com.fasterxml.uuid.Logger
class (this generally determines
j.u.l category output etc settings).
Method will create a simple wrapper, and call
Logger.setLogger(com.fasterxml.uuid.Logger)
with the wrapper as
the argument. This will then re-direct logging from the previously
defined Logger (which initially is the simple JUG logger) to the
new wrapper, which routes logging messages to the j.u.l peer Logger
instance.
protected void doSetOutput(PrintStream str)
doSetOutput
in class Logger
protected void doSetOutput(Writer w)
doSetOutput
in class Logger
protected void doLogInfo(String msg)
doLogInfo
in class Logger
protected void doLogWarning(String msg)
doLogWarning
in class Logger
protected void doLogError(String msg)
doLogError
in class Logger
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |