com.fasterxml.uuid.ext
Class JavaUtilLogger

java.lang.Object
  extended by com.fasterxml.uuid.Logger
      extended by com.fasterxml.uuid.ext.JavaUtilLogger

public class JavaUtilLogger
extends Logger

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

connectToJavaUtilLogging

public 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.

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.


connectToJavaUtilLogging

public 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).

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.


doSetOutput

protected void doSetOutput(PrintStream str)
Note: this method is meaningless with log4j, since it has more advanced output mapping and filtering mechanisms. As such, it's a no-op

Overrides:
doSetOutput in class Logger

doSetOutput

protected void doSetOutput(Writer w)
Note: this method is meaningless with log4j, since it has more advanced output mapping and filtering mechanisms. As such, it's a no-op

Overrides:
doSetOutput in class Logger

doLogInfo

protected void doLogInfo(String msg)
Overrides:
doLogInfo in class Logger

doLogWarning

protected void doLogWarning(String msg)
Overrides:
doLogWarning in class Logger

doLogError

protected void doLogError(String msg)
Overrides:
doLogError in class Logger


Copyright © 2011 FasterXML.com. All Rights Reserved.