Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

log4j
Class Log4jLogger  view Log4jLogger download Log4jLogger.java

java.lang.Object
  extended bylog4j.Log4jLogger
All Implemented Interfaces:
org.apache.slide.util.logger.Logger

public class Log4jLogger
extends java.lang.Object
implements org.apache.slide.util.logger.Logger

Log4j logger implementation.


Field Summary
 
Fields inherited from interface org.apache.slide.util.logger.Logger
CRITICAL, DEBUG, DEFAULT_CHANNEL, EMERGENCY, ERROR, INFO, WARNING
 
Constructor Summary
Log4jLogger()
           
 
Method Summary
protected  int fromLevel(org.apache.log4j.Level level)
          Convert Slide level to log4j level.
private  org.apache.log4j.Category getCategory(java.lang.String channel)
           
 int getLoggerLevel()
          Logger level getter.
 int getLoggerLevel(java.lang.String channel)
          Logger level getter.
 boolean isEnabled(int level)
          Check if the default channel with the specified level is enabled for logging.
 boolean isEnabled(java.lang.String channel, int level)
          Check if the channel with the specified level is enabled for logging.
 void log(java.lang.Object data)
          Log an object.
 void log(java.lang.Object data, int level)
          Log an object with the specified level.
 void log(java.lang.Object data, java.lang.String channel, int level)
          Log an object thru the specified channel and with the specified level.
 void log(java.lang.Object data, java.lang.Throwable throwable, java.lang.String channel, int level)
          Log an object and an associated throwable thru the specified channel and with the specified level.
 void setLoggerLevel(int loggerLevel)
          Logger level setter.
 void setLoggerLevel(java.lang.String channel, int loggerLevel)
          Logger level setter.
protected  org.apache.log4j.Level toLevel(int level)
          Convert Slide level to log4j level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jLogger

public Log4jLogger()
Method Detail

setLoggerLevel

public void setLoggerLevel(java.lang.String channel,
                           int loggerLevel)
Logger level setter.

Specified by:
setLoggerLevel in interface org.apache.slide.util.logger.Logger

setLoggerLevel

public void setLoggerLevel(int loggerLevel)
Logger level setter.

Specified by:
setLoggerLevel in interface org.apache.slide.util.logger.Logger

getLoggerLevel

public int getLoggerLevel(java.lang.String channel)
Logger level getter.

Specified by:
getLoggerLevel in interface org.apache.slide.util.logger.Logger

getLoggerLevel

public int getLoggerLevel()
Logger level getter.

Specified by:
getLoggerLevel in interface org.apache.slide.util.logger.Logger

log

public void log(java.lang.Object data,
                java.lang.Throwable throwable,
                java.lang.String channel,
                int level)
Log an object and an associated throwable thru the specified channel and with the specified level.

Specified by:
log in interface org.apache.slide.util.logger.Logger

log

public void log(java.lang.Object data,
                java.lang.String channel,
                int level)
Log an object thru the specified channel and with the specified level.

Specified by:
log in interface org.apache.slide.util.logger.Logger

log

public void log(java.lang.Object data,
                int level)
Log an object with the specified level.

Specified by:
log in interface org.apache.slide.util.logger.Logger

log

public void log(java.lang.Object data)
Log an object.

Specified by:
log in interface org.apache.slide.util.logger.Logger

isEnabled

public boolean isEnabled(java.lang.String channel,
                         int level)
Check if the channel with the specified level is enabled for logging. This implementation ignores the channel specification

Specified by:
isEnabled in interface org.apache.slide.util.logger.Logger

isEnabled

public boolean isEnabled(int level)
Check if the default channel with the specified level is enabled for logging.

Specified by:
isEnabled in interface org.apache.slide.util.logger.Logger

getCategory

private org.apache.log4j.Category getCategory(java.lang.String channel)

toLevel

protected org.apache.log4j.Level toLevel(int level)
Convert Slide level to log4j level.


fromLevel

protected int fromLevel(org.apache.log4j.Level level)
Convert Slide level to log4j level.