org.apache.ojb.broker.util.logging
Interface Logger

All Superinterfaces:
org.apache.ojb.broker.util.configuration.Configurable, java.io.Serializable
All Known Implementing Classes:
CommonsLoggerImpl, Log4jLoggerImpl, PoorMansLoggerImpl, StringBufferLoggerImpl

public interface Logger
extends java.io.Serializable, org.apache.ojb.broker.util.configuration.Configurable

this interface defines the behaviour of a logging mechanism. This API corresponds closely to the LOG4J Category Api. By using this interface OJB remains free from Logger-Implementation specific code.


Field Summary
static int DEBUG
           
static int ERROR
           
static int FATAL
           
static int INFO
           
static long serialVersionUID
           
static int WARN
           
 
Method Summary
 void configure(org.apache.ojb.broker.util.configuration.Configuration config)
          Configure this logging.
 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)
           
 java.lang.String getName()
          returns the name of the logger isntance
 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 safeDebug(java.lang.String message, java.lang.Object obj)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void safeDebug(java.lang.String message, java.lang.Object obj, java.lang.Throwable t)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void safeError(java.lang.String message, java.lang.Object obj)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void safeError(java.lang.String message, java.lang.Object obj, java.lang.Throwable t)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void safeFatal(java.lang.String message, java.lang.Object obj)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void safeFatal(java.lang.String message, java.lang.Object obj, java.lang.Throwable t)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void safeInfo(java.lang.String message, java.lang.Object obj)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void safeInfo(java.lang.String message, java.lang.Object obj, java.lang.Throwable t)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void safeWarn(java.lang.String message, java.lang.Object obj)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void safeWarn(java.lang.String message, java.lang.Object obj, java.lang.Throwable t)
          Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.
 void warn(java.lang.Object pObject)
          generate a message for loglevel WARN
 void warn(java.lang.Object message, java.lang.Throwable obj)
           
 

Field Detail

serialVersionUID

static final long serialVersionUID
See Also:
Constant Field Values

DEBUG

static final int DEBUG
See Also:
Constant Field Values

INFO

static final int INFO
See Also:
Constant Field Values

WARN

static final int WARN
See Also:
Constant Field Values

ERROR

static final int ERROR
See Also:
Constant Field Values

FATAL

static final int FATAL
See Also:
Constant Field Values
Method Detail

debug

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

Parameters:
pObject - the message Object

info

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

Parameters:
pObject - the message Object

warn

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

Parameters:
pObject - the message Object

error

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

Parameters:
pObject - the message Object

fatal

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

Parameters:
pObject - the message Object

debug

void debug(java.lang.Object message,
           java.lang.Throwable obj)

info

void info(java.lang.Object message,
          java.lang.Throwable obj)

warn

void warn(java.lang.Object message,
          java.lang.Throwable obj)

error

void error(java.lang.Object message,
           java.lang.Throwable obj)

fatal

void fatal(java.lang.Object message,
           java.lang.Throwable obj)

isEnabledFor

boolean isEnabledFor(int priority)

isDebugEnabled

boolean isDebugEnabled()

getName

java.lang.String getName()
returns the name of the logger isntance


safeDebug

void safeDebug(java.lang.String message,
               java.lang.Object obj)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : DEBUG


safeDebug

void safeDebug(java.lang.String message,
               java.lang.Object obj,
               java.lang.Throwable t)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : DEBUG


safeInfo

void safeInfo(java.lang.String message,
              java.lang.Object obj)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : INFO


safeInfo

void safeInfo(java.lang.String message,
              java.lang.Object obj,
              java.lang.Throwable t)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : INFO


safeWarn

void safeWarn(java.lang.String message,
              java.lang.Object obj)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : WARN


safeWarn

void safeWarn(java.lang.String message,
              java.lang.Object obj,
              java.lang.Throwable t)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : WARN


safeError

void safeError(java.lang.String message,
               java.lang.Object obj)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : ERROR


safeError

void safeError(java.lang.String message,
               java.lang.Object obj,
               java.lang.Throwable t)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : ERROR


safeFatal

void safeFatal(java.lang.String message,
               java.lang.Object obj)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : FATAL


safeFatal

void safeFatal(java.lang.String message,
               java.lang.Object obj,
               java.lang.Throwable t)
Deprecated. The normal logging methods should always be safe with regard to exceptions that are thrown while accessing the arguments.

Exception safe log method. This method can be used to prevent any exception thrown by obj.toString() implementations. Log level used : FATAL


configure

void configure(org.apache.ojb.broker.util.configuration.Configuration config)
               throws org.apache.ojb.broker.util.configuration.ConfigurationException
Configure this logging. Note that the config object will be an instance of LoggingConfiguration.

Specified by:
configure in interface org.apache.ojb.broker.util.configuration.Configurable
Parameters:
config - The LoggingConfiguration object
Throws:
org.apache.ojb.broker.util.configuration.ConfigurationException


(C) 2002 - 2006 Apache Software Foundation
All rights reserved. Published under the Apache License 2.0.
http://db.apache.org/ojb
Version: 1.0.4, 2005-12-30