org.jboss.logging
Class Log4jLoggerPlugin

java.lang.Object
  extended byorg.jboss.logging.Log4jLoggerPlugin
All Implemented Interfaces:
LoggerPlugin (src)

public class Log4jLoggerPlugin
extends java.lang.Object
implements LoggerPlugin (src)

Delegate for org.jboss.logging.Logger logging to log4j. Body of implementation mainly copied from old Logger implementation.

See Also:
Logger (src) , LoggerPlugin (src)

Constructor Summary
Log4jLoggerPlugin()
           
 
Method Summary
 void debug(java.lang.Object message)
          Issue a log msg with a level of DEBUG.
 void debug(java.lang.Object message, java.lang.Throwable t)
          Issue a log msg and throwable with a level of DEBUG.
 void error(java.lang.Object message)
          Issue a log msg with a level of ERROR.
 void error(java.lang.Object message, java.lang.Throwable t)
          Issue a log msg and throwable with a level of ERROR.
 void fatal(java.lang.Object message)
          Issue a log msg with a level of FATAL.
 void fatal(java.lang.Object message, java.lang.Throwable t)
          Issue a log msg and throwable with a level of FATAL.
 Category getCategory()
           
 org.apache.log4j.Logger getLogger()
          Exposes the delegate Log4j Logger.
 void info(java.lang.Object message)
          Issue a log msg with a level of INFO.
 void info(java.lang.Object message, java.lang.Throwable t)
          Issue a log msg and throwable with a level of INFO.
 void init(java.lang.String name)
           
 boolean isDebugEnabled()
          Check to see if the TRACE level is enabled for this logger.
 boolean isInfoEnabled()
          Check to see if the INFO level is enabled for this logger.
 boolean isTraceEnabled()
           
 void log(Priority p, java.lang.Object message)
          Deprecated. Use Level versions.
 void log(Priority p, java.lang.Object message, java.lang.Throwable t)
          Deprecated. Use Level versions.
 void trace(java.lang.Object message)
          Issue a log msg with a level of TRACE.
 void trace(java.lang.Object message, java.lang.Throwable t)
          Issue a log msg and throwable with a level of TRACE.
 void warn(java.lang.Object message)
          Issue a log msg with a level of WARN.
 void warn(java.lang.Object message, java.lang.Throwable t)
          Issue a log msg and throwable with a level of WARN.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jLoggerPlugin

public Log4jLoggerPlugin()
Method Detail

init

public void init(java.lang.String name)
Specified by:
init in interface LoggerPlugin (src)

getCategory

public Category getCategory()

getLogger

public org.apache.log4j.Logger getLogger()
Exposes the delegate Log4j Logger.


isTraceEnabled

public boolean isTraceEnabled()
Specified by:
isTraceEnabled in interface LoggerPlugin (src)

trace

public void trace(java.lang.Object message)
Issue a log msg with a level of TRACE. Invokes log.log(XLevel.TRACE, message);

Specified by:
trace in interface LoggerPlugin (src)

trace

public void trace(java.lang.Object message,
                  java.lang.Throwable t)
Issue a log msg and throwable with a level of TRACE. Invokes log.log(XLevel.TRACE, message, t);

Specified by:
trace in interface LoggerPlugin (src)

isDebugEnabled

public boolean isDebugEnabled()
Check to see if the TRACE level is enabled for this logger.

Specified by:
isDebugEnabled in interface LoggerPlugin (src)
Returns:
true if a trace(Object) method invocation would pass the msg to the configured appenders, false otherwise.

debug

public void debug(java.lang.Object message)
Issue a log msg with a level of DEBUG. Invokes log.log(Level.DEBUG, message);

Specified by:
debug in interface LoggerPlugin (src)

debug

public void debug(java.lang.Object message,
                  java.lang.Throwable t)
Issue a log msg and throwable with a level of DEBUG. Invokes log.log(Level.DEBUG, message, t);

Specified by:
debug in interface LoggerPlugin (src)

isInfoEnabled

public boolean isInfoEnabled()
Check to see if the INFO level is enabled for this logger.

Specified by:
isInfoEnabled in interface LoggerPlugin (src)
Returns:
true if a info(Object) method invocation would pass the msg to the configured appenders, false otherwise.

info

public void info(java.lang.Object message)
Issue a log msg with a level of INFO. Invokes log.log(Level.INFO, message);

Specified by:
info in interface LoggerPlugin (src)

info

public void info(java.lang.Object message,
                 java.lang.Throwable t)
Issue a log msg and throwable with a level of INFO. Invokes log.log(Level.INFO, message, t);

Specified by:
info in interface LoggerPlugin (src)

warn

public void warn(java.lang.Object message)
Issue a log msg with a level of WARN. Invokes log.log(Level.WARN, message);

Specified by:
warn in interface LoggerPlugin (src)

warn

public void warn(java.lang.Object message,
                 java.lang.Throwable t)
Issue a log msg and throwable with a level of WARN. Invokes log.log(Level.WARN, message, t);

Specified by:
warn in interface LoggerPlugin (src)

error

public void error(java.lang.Object message)
Issue a log msg with a level of ERROR. Invokes log.log(Level.ERROR, message);

Specified by:
error in interface LoggerPlugin (src)

error

public void error(java.lang.Object message,
                  java.lang.Throwable t)
Issue a log msg and throwable with a level of ERROR. Invokes log.log(Level.ERROR, message, t);

Specified by:
error in interface LoggerPlugin (src)

fatal

public void fatal(java.lang.Object message)
Issue a log msg with a level of FATAL. Invokes log.log(Level.FATAL, message);

Specified by:
fatal in interface LoggerPlugin (src)

fatal

public void fatal(java.lang.Object message,
                  java.lang.Throwable t)
Issue a log msg and throwable with a level of FATAL. Invokes log.log(Level.FATAL, message, t);

Specified by:
fatal in interface LoggerPlugin (src)

log

public void log(Priority p,
                java.lang.Object message)
Deprecated. Use Level versions.

Issue a log msg with the given level. Invokes log.log(p, message);


log

public void log(Priority p,
                java.lang.Object message,
                java.lang.Throwable t)
Deprecated. Use Level versions.

Issue a log msg with the given priority. Invokes log.log(p, message, t);