EAF 7.4 Implementation

com.lutris.logging
Class LogAdapter

java.lang.Object
  extended by com.lutris.logging.LogAdapter
All Implemented Interfaces:
com.lutris.logging.LogChannel

public class LogAdapter
extends java.lang.Object
implements com.lutris.logging.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)
           
 org.apache.log4j.Logger getLogger()
           
 com.lutris.logging.LogWriter getLogWriter(int level)
          Create a LogWrite associated with a particular level.
 com.lutris.logging.LogWriter getLogWriter(java.lang.String level)
          Create a LogWrite associated with a particular level.
 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)
Specified by:
getLevel in interface com.lutris.logging.LogChannel

isEnabled

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

Specified by:
isEnabled in interface com.lutris.logging.LogChannel

isEnabled

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

Specified by:
isEnabled in interface com.lutris.logging.LogChannel

write

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

Specified by:
write in interface com.lutris.logging.LogChannel

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 com.lutris.logging.LogChannel

write

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

Specified by:
write in interface com.lutris.logging.LogChannel

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 com.lutris.logging.LogChannel

getLogWriter

public com.lutris.logging.LogWriter getLogWriter(java.lang.String level)
Create a LogWrite associated with a particular level. This is often an easier object to use than a LogChannel if limited levels are needed.

Specified by:
getLogWriter in interface com.lutris.logging.LogChannel
Parameters:
level - Symbolic level that is to be checked.
Returns:
A log writer object.

getLogWriter

public com.lutris.logging.LogWriter getLogWriter(int level)
Create a LogWrite associated with a particular level. This is often an easier object to use than a LogChannel if limited levels are needed.

Specified by:
getLogWriter in interface com.lutris.logging.LogChannel
Parameters:
level - Numeric level that is to be checked.
Returns:
A log writer object.

EAF 7.4 Implementation