Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.commons.logging.impl.Jdk13LumberjackLogger
org.apache.commons.logging.Log
interface that wraps the standard JDK logging mechanisms that are
available in SourceForge's Lumberjack for JDKs prior to 1.4.
Field Summary | |
private boolean | |
protected static Level |
|
protected Logger |
|
protected String | |
private String | |
private String |
Constructor Summary | |
|
Method Summary | |
void |
|
void |
|
void |
|
void |
|
void |
|
void |
|
private void |
|
Logger |
|
void |
|
void |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
boolean |
|
private void |
|
void |
|
void |
|
void |
|
void |
|
private boolean classAndMethodFound
protected static final Level dummyLevel
This member variable simply ensures that any attempt to initialise this class in a pre-1.4 JVM will result in an ExceptionInInitializerError. It must not be private, as an optimising compiler could detect that it is not used and optimise it away.
protected Logger logger
The underlying Logger implementation we are using.
protected String name
private String sourceClassName
private String sourceMethodName
public Jdk13LumberjackLogger(String name)
Construct a named instance of this Logger.
- Parameters:
name
- Name of the logger to be constructed
public void debug(Object message)
Logs a message withjava.util.logging.Level.FINE
.
- Parameters:
message
- to log
- See Also:
Log.debug(Object)
public void debug(Object message, Throwable exception)
Logs a message withjava.util.logging.Level.FINE
.
- Parameters:
message
- to logexception
- log this cause
- See Also:
Log.debug(Object,Throwable)
public void error(Object message)
Logs a message withjava.util.logging.Level.SEVERE
.
- Parameters:
message
- to log
- See Also:
Log.error(Object)
public void error(Object message, Throwable exception)
Logs a message withjava.util.logging.Level.SEVERE
.
- Parameters:
message
- to logexception
- log this cause
- See Also:
Log.error(Object,Throwable)
public void fatal(Object message)
Logs a message withjava.util.logging.Level.SEVERE
.
- Parameters:
message
- to log
- See Also:
Log.fatal(Object)
public void fatal(Object message, Throwable exception)
Logs a message withjava.util.logging.Level.SEVERE
.
- Parameters:
message
- to logexception
- log this cause
- See Also:
Log.fatal(Object,Throwable)
private void getClassAndMethod()
Gets the class and method by looking at the stack trace for the first entry that is not this class.
public Logger getLogger()
Return the native Logger instance we are using.
public void info(Object message)
Logs a message withjava.util.logging.Level.INFO
.
- Parameters:
message
- to log
- See Also:
Log.info(Object)
public void info(Object message, Throwable exception)
Logs a message withjava.util.logging.Level.INFO
.
- Parameters:
message
- to logexception
- log this cause
- See Also:
Log.info(Object,Throwable)
public boolean isDebugEnabled()
Is debug logging currently enabled?
- Specified by:
- isDebugEnabled in interface Log
public boolean isErrorEnabled()
Is error logging currently enabled?
- Specified by:
- isErrorEnabled in interface Log
public boolean isFatalEnabled()
Is fatal logging currently enabled?
- Specified by:
- isFatalEnabled in interface Log
public boolean isInfoEnabled()
Is info logging currently enabled?
- Specified by:
- isInfoEnabled in interface Log
public boolean isTraceEnabled()
Is trace logging currently enabled?
- Specified by:
- isTraceEnabled in interface Log
public boolean isWarnEnabled()
Is warn logging currently enabled?
- Specified by:
- isWarnEnabled in interface Log
private void log(Level level, String msg, Throwable ex)
public void trace(Object message)
Logs a message withjava.util.logging.Level.FINEST
.
- Parameters:
message
- to log
- See Also:
Log.trace(Object)
public void trace(Object message, Throwable exception)
Logs a message withjava.util.logging.Level.FINEST
.
- Parameters:
message
- to logexception
- log this cause
- See Also:
Log.trace(Object,Throwable)
public void warn(Object message)
Logs a message withjava.util.logging.Level.WARNING
.
- Parameters:
message
- to log
- See Also:
Log.warn(Object)
public void warn(Object message, Throwable exception)
Logs a message withjava.util.logging.Level.WARNING
.
- Parameters:
message
- to logexception
- log this cause
- See Also:
Log.warn(Object,Throwable)