java.lang.Object
ojb.broker.util.logging.Log4jLoggerImpl
- All Implemented Interfaces:
- ojb.broker.util.configuration.Configurable, Logger, java.io.Serializable
- public class Log4jLoggerImpl
- extends java.lang.Object
- implements Logger
This is a Logger implementation based on Log4j.
It can be enabled by putting
LoggerClass=ojb.broker.util.logging.Log4jLoggerImpl
in the OJB .properties file.
If you want log4j to initialize from a property file you can add
LoggerConfigFile=log4j.properties to the ojb.properties file.
the logger only initializes log4j if the application hasn't done it yet
You can find sample log4j.properties file in the log4j web site
http://jakarta.apache.org/log4j
in the javadoc look for org.apache.log4j.examples
- Version:
- $Id: Log4jLoggerImpl.java,v 1.4 2002/05/06 23:19:02 cgreenlee Exp $
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
priorityMap
private static java.util.HashMap priorityMap
log4jconfigured
private static boolean log4jconfigured
cat
private transient org.apache.log4j.Category cat
name
private java.lang.String name
configFile
private java.lang.String configFile
Log4jLoggerImpl
public Log4jLoggerImpl(java.lang.String name)
getCat
private org.apache.log4j.Category getCat()
- Gets the cat.
debug
public final void debug(java.lang.Object pObject)
- generate a message for loglevel DEBUG
- Specified by:
debug in interface Logger
info
public final void info(java.lang.Object pObject)
- generate a message for loglevel INFO
- Specified by:
info in interface Logger
warn
public final void warn(java.lang.Object pObject)
- generate a message for loglevel WARN
- Specified by:
warn in interface Logger
error
public final void error(java.lang.Object pObject)
- generate a message for loglevel ERROR
- Specified by:
error in interface Logger
fatal
public final void fatal(java.lang.Object pObject)
- generate a message for loglevel FATAL
- Specified by:
fatal in interface Logger
debug
public void debug(java.lang.Object message,
java.lang.Throwable obj)
- Specified by:
debug in interface Logger
error
public void error(java.lang.Object message,
java.lang.Throwable obj)
- Specified by:
error in interface Logger
fatal
public void fatal(java.lang.Object message,
java.lang.Throwable obj)
- Specified by:
fatal in interface Logger
info
public void info(java.lang.Object message,
java.lang.Throwable obj)
- Specified by:
info in interface Logger
warn
public void warn(java.lang.Object message,
java.lang.Throwable obj)
- Specified by:
warn in interface Logger
isDebugEnabled
public boolean isDebugEnabled()
- Specified by:
isDebugEnabled in interface Logger
isEnabledFor
public boolean isEnabledFor(int priority)
- Specified by:
isEnabledFor in interface Logger
configure
public void configure(ojb.broker.util.configuration.Configuration config)
throws ojb.broker.util.configuration.ConfigurationException
- Description copied from interface:
ojb.broker.util.configuration.Configurable
- configure an object using the Configuration config
- Specified by:
configure in interface ojb.broker.util.configuration.Configurable
setConfigurationFile
private void setConfigurationFile(java.lang.String configurationFile)