org.snmp4j.log
Class Log4jLogFactory
java.lang.Object
org.snmp4j.log.LogFactory
org.snmp4j.log.Log4jLogFactory
public class Log4jLogFactory
- extends LogFactory
The Log4jLogFactory
implements a SNMP4J LogFactory for
Log4J. In order to use Log4J for logging SNMP4J log messages the
static LogFactory.setLogFactory(org.snmp4j.log.LogFactory)
method has to be used before
any SNMP4J class is referenced or instantiated.
- Since:
- 1.2.1
- Version:
- 1.6.1
- Author:
- Frank Fock
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Log4jLogFactory
public Log4jLogFactory()
createLogger
protected LogAdapter createLogger(java.lang.Class c)
- Description copied from class:
LogFactory
- Creates a Logger for the specified class. This method returns the
NoLogger
logger instance which disables logging.
Overwrite this method the return a custom logger to enable logging for
SNMP4J.
- Overrides:
createLogger
in class LogFactory
- Parameters:
c
- the class for which a logger needs to be created.
- Returns:
- the
LogAdapter
instance.
createLogger
protected LogAdapter createLogger(java.lang.String className)
- Description copied from class:
LogFactory
- Creates a Logger for the specified class. This method returns the
NoLogger
logger instance which disables logging.
Overwrite this method the return a custom logger to enable logging for
SNMP4J.
- Overrides:
createLogger
in class LogFactory
- Parameters:
className
- the class name for which a logger needs to be created.
- Returns:
- the
LogAdapter
instance.
getRootLogger
public LogAdapter getRootLogger()
- Description copied from class:
LogFactory
- Returns the top level logger.
- Overrides:
getRootLogger
in class LogFactory
- Returns:
- a LogAdapter instance.
loggers
public java.util.Iterator loggers()
- Description copied from class:
LogFactory
- Returns all available LogAdapters in depth first order.
- Overrides:
loggers
in class LogFactory
- Returns:
- a read-only Iterator.
Copyright © 2011 SNMP4J.org. All Rights Reserved.