| 
 | ||||||||||
| 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.Log4jLogger
public class Log4jLogger
Simple wrapper that allows easy connecting of JUG logging into log4j logging subsystem.
Note: using this class implies all the dependencies that the log4j subsystem in use requires (JDK 1.2 or above, in general)
| 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 | connectToLog4j()Static method to call to make JUG use a log4j proxy all of its logging through a log4j Loggerconstructed to correspond withcom.fasterxml.uuid.Loggerclass (this generally determines
 log4j category output etc settings). | 
| static void | connectToLog4j(org.apache.log4j.Logger peer)Static method to call to make JUG use to proxy all of its logging through the specified log4j Loggerinstance. | 
| 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 connectToLog4j(org.apache.log4j.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 connectToLog4j()
Logger constructed to correspond with
 com.fasterxml.uuid.Logger class (this generally determines
 log4j 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 log4j peer Logger
 instance.
protected void doSetOutput(PrintStream str)
doSetOutput in class Loggerprotected void doSetOutput(Writer w)
doSetOutput in class Loggerprotected void doLogInfo(String msg)
doLogInfo in class Loggerprotected void doLogWarning(String msg)
doLogWarning in class Loggerprotected void doLogError(String msg)
doLogError in class Logger| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||