|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.snmp4j.log.Log4jLogAdapter
public class Log4jLogAdapter
The Log4jLogAdapter
implements a logging adapter for Log4J.
Constructor Summary | |
---|---|
Log4jLogAdapter(org.apache.log4j.Logger logger)
Creates a Log4J log adapter from a Log4J Logger. |
Method Summary | |
---|---|
int |
compareTo(java.lang.Object o)
|
void |
debug(java.lang.Object message)
Logs a debug message. |
void |
error(java.lang.Object message)
Logs an error message. |
void |
error(java.lang.Object message,
java.lang.Throwable throwable)
Logs an error message. |
void |
fatal(java.lang.Object message)
Logs a fatal message. |
void |
fatal(java.lang.Object message,
java.lang.Throwable throwable)
Logs a fatal message. |
LogLevel |
getEffectiveLogLevel()
Returns the log level that is effective for this log adapter. |
org.apache.log4j.Logger |
getLogger()
|
java.util.Iterator |
getLogHandler()
Returns the log handlers associated with this logger. |
LogLevel |
getLogLevel()
Returns the log level defined for this log adapter. |
java.lang.String |
getName()
Returns the name of the logger. |
void |
info(java.lang.Object message)
Logs an informational message. |
boolean |
isDebugEnabled()
Checks whether DEBUG level logging is activated for this log adapter. |
boolean |
isInfoEnabled()
Checks whether INFO level logging is activated for this log adapter. |
boolean |
isWarnEnabled()
Checks whether WARN level logging is activated for this log adapter. |
void |
setLogLevel(LogLevel level)
Sets the log level for this log adapter (if applicable). |
void |
warn(java.lang.Object message)
Logs an warning message. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Log4jLogAdapter(org.apache.log4j.Logger logger)
logger
- the Log4J Logger to use with this adapter.Method Detail |
---|
public void debug(java.lang.Object message)
debug
in interface LogAdapter
message
- the message to log.public void error(java.lang.Object message)
error
in interface LogAdapter
message
- the message to log.public void error(java.lang.Object message, java.lang.Throwable throwable)
error
in interface LogAdapter
message
- the message to log.throwable
- the exception that caused to error.public void info(java.lang.Object message)
info
in interface LogAdapter
message
- the message to log.public boolean isDebugEnabled()
isDebugEnabled
in interface LogAdapter
true
if logging is enabled or false
otherwise.public boolean isInfoEnabled()
isInfoEnabled
in interface LogAdapter
true
if logging is enabled or false
otherwise.public boolean isWarnEnabled()
isWarnEnabled
in interface LogAdapter
true
if logging is enabled or false
otherwise.public void warn(java.lang.Object message)
warn
in interface LogAdapter
message
- the message to log.public void fatal(java.lang.Object message)
LogAdapter
fatal
in interface LogAdapter
message
- the message to log.public void fatal(java.lang.Object message, java.lang.Throwable throwable)
LogAdapter
fatal
in interface LogAdapter
message
- the message to log.throwable
- the exception that caused to error.public void setLogLevel(LogLevel level)
LogAdapter
setLogLevel
in interface LogAdapter
level
- a LogLevel instance.public org.apache.log4j.Logger getLogger()
public java.lang.String getName()
LogAdapter
getName
in interface LogAdapter
public LogLevel getLogLevel()
LogAdapter
getLogLevel
in interface LogAdapter
public int compareTo(java.lang.Object o)
compareTo
in interface java.lang.Comparable
public LogLevel getEffectiveLogLevel()
LogAdapter
LogLevel.NONE
to the root.
getEffectiveLogLevel
in interface LogAdapter
LogLevel.NONE
.public java.util.Iterator getLogHandler()
LogAdapter
getLogHandler
in interface LogAdapter
|
Copyright 2005-2010 Frank Fock (SNMP4J.org) | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |