Enhydra 5.1 API

com.lutris.logging
Class LogAdapter

java.lang.Object
  |
  +--com.lutris.logging.LogAdapter
All Implemented Interfaces:
LogChannel

public class LogAdapter
extends java.lang.Object
implements LogChannel

Temporary class for maintaing old applications that uses deprecated com.lutris.logging.*


Constructor Summary
LogAdapter()
           
LogAdapter(org.apache.log4j.Logger logger)
           
 
Method Summary
 int getLevel(java.lang.String level)
          Convert a symbolic level to an integer identifier.
 org.apache.log4j.Logger getLogger()
           
 boolean isEnabled(int level)
          Determine if logging is enabled for the specified level.
 boolean isEnabled(java.lang.String level)
          Determine if logging is enabled for the specified level.
 void setLogger(org.apache.log4j.Logger log)
           
 void write(int level, java.lang.String msg)
          Write a string to the log file.
 void write(int level, java.lang.String msg, java.lang.Throwable throwable)
          Write a string and exception to the log file.
 void write(java.lang.String level, java.lang.String msg)
          Write a string to the log file.
 void write(java.lang.String level, java.lang.String msg, java.lang.Throwable throwable)
          Write a string and exception to the log file.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogAdapter

public LogAdapter()

LogAdapter

public LogAdapter(org.apache.log4j.Logger logger)
Method Detail

setLogger

public void setLogger(org.apache.log4j.Logger log)

getLogger

public org.apache.log4j.Logger getLogger()

getLevel

public int getLevel(java.lang.String level)
Description copied from interface: LogChannel
Convert a symbolic level to an integer identifier.

Specified by:
getLevel in interface LogChannel
Parameters:
level - Symbolic level to convert
Returns:
The numeric level identifier

isEnabled

public boolean isEnabled(int level)
Determine if logging is enabled for the specified level.

Specified by:
isEnabled in interface LogChannel
Parameters:
level - Numeric level that is to be checked.
Returns:
true if enabled, false if not enabled.

isEnabled

public boolean isEnabled(java.lang.String level)
Determine if logging is enabled for the specified level.

Specified by:
isEnabled in interface LogChannel
Parameters:
level - Symbolic level that is to be checked.
Returns:
true if enabled, false if not enabled.

write

public void write(int level,
                  java.lang.String msg)
Write a string to the log file.

Specified by:
write in interface LogChannel
Parameters:
level - Numeric level the message is associated with.
msg - The message to log.

write

public void write(int level,
                  java.lang.String msg,
                  java.lang.Throwable throwable)
Write a string and exception to the log file.

Specified by:
write in interface LogChannel
Parameters:
level - Numeric level the message is associated with.
msg - The message to log.
throwable - Exception or error to log.

write

public void write(java.lang.String level,
                  java.lang.String msg)
Write a string to the log file.

Specified by:
write in interface LogChannel
Parameters:
level - Symbolic level the message is associated with.
msg - The message to log.

write

public void write(java.lang.String level,
                  java.lang.String msg,
                  java.lang.Throwable throwable)
Write a string and exception to the log file.

Specified by:
write in interface LogChannel
Parameters:
level - Symbolic level the message is associated with.
msg - The message to log.
throwable - Exception or error to log.

Enhydra 5.1 API