ojb.broker.util.logging
Class Log4jLoggerImpl

java.lang.Object
  |
  +--ojb.broker.util.logging.Log4jLoggerImpl
All Implemented Interfaces:
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.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

Author:
Bertrand
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface ojb.broker.util.logging.Logger
DEBUG, ERROR, FATAL, INFO, WARN
 
Constructor Summary
Log4jLoggerImpl(java.lang.String name)
           
 
Method Summary
 void debug(java.lang.Object pObject)
          generate a message for loglevel DEBUG
 void debug(java.lang.Object message, java.lang.Throwable obj)
           
 void error(java.lang.Object pObject)
          generate a message for loglevel ERROR
 void error(java.lang.Object message, java.lang.Throwable obj)
           
 void fatal(java.lang.Object pObject)
          generate a message for loglevel FATAL
 void fatal(java.lang.Object message, java.lang.Throwable obj)
           
 void info(java.lang.Object pObject)
          generate a message for loglevel INFO
 void info(java.lang.Object message, java.lang.Throwable obj)
           
 boolean isDebugEnabled()
           
 boolean isEnabledFor(int priority)
           
 void warn(java.lang.Object pObject)
          generate a message for loglevel WARN
 void warn(java.lang.Object message, java.lang.Throwable obj)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jLoggerImpl

public Log4jLoggerImpl(java.lang.String name)
Method Detail

debug

public final void debug(java.lang.Object pObject)
generate a message for loglevel DEBUG

Specified by:
debug in interface Logger
Parameters:
pObject - the message Object

info

public final void info(java.lang.Object pObject)
generate a message for loglevel INFO

Specified by:
info in interface Logger
Parameters:
pObject - the message Object

warn

public final void warn(java.lang.Object pObject)
generate a message for loglevel WARN

Specified by:
warn in interface Logger
Parameters:
pObject - the message Object

error

public final void error(java.lang.Object pObject)
generate a message for loglevel ERROR

Specified by:
error in interface Logger
Parameters:
pObject - the message Object

fatal

public final void fatal(java.lang.Object pObject)
generate a message for loglevel FATAL

Specified by:
fatal in interface Logger
Parameters:
pObject - the message Object

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


Authors: Thomas Mahler and others. (C) 2000, 2001.
All rights reserved. Published under the Gnu Public License.
http://objectbridge.sourceforge.net
Version: 0.8.375, 2002-04-04