EAF 6.4 Implementation

com.lutris.logging
Class Log4jLogWriter

java.lang.Object
  extended byjava.io.Writer
      extended byjava.io.PrintWriter
          extended bycom.lutris.logging.LogWriter
              extended bycom.lutris.logging.Log4jLogWriter

public class Log4jLogWriter
extends com.lutris.logging.LogWriter

Class use to write log output to a particular LogChannel and level. This class is PrintWriter, with println() causing a write. One should use println() with this rather than write, as with a LogChannel, since write doesn't write a full line.


Field Summary
 
Fields inherited from class java.io.PrintWriter
out
 
Fields inherited from class java.io.Writer
lock
 
Constructor Summary
protected Log4jLogWriter(com.lutris.logging.LogChannel logChannel, int logLevel)
          Constructor.
protected Log4jLogWriter(com.lutris.logging.LogChannel logChannel, java.lang.String logLevel)
          Constructor.
 
Method Summary
 com.lutris.logging.LogChannel getChannel()
          Get the associate channel.
 int getLevel()
          Get the associate level.
 void println(java.lang.String msg, java.lang.Throwable throwable)
          Write a string and exception to the log file.
 
Methods inherited from class com.lutris.logging.LogWriter
isEnabled
 
Methods inherited from class java.io.PrintWriter
checkError, close, flush, print, print, print, print, print, print, print, print, print, println, println, println, println, println, println, println, println, println, println, setError, write, write, write, write, write
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4jLogWriter

protected Log4jLogWriter(com.lutris.logging.LogChannel logChannel,
                         java.lang.String logLevel)
Constructor.

Parameters:
logChannel - The log channel to write to.
logLevel - The level associated with this channel.

Log4jLogWriter

protected Log4jLogWriter(com.lutris.logging.LogChannel logChannel,
                         int logLevel)
Constructor.

Parameters:
logChannel - The log channel to write to.
logLevel - The level associated with this channel.
Method Detail

getChannel

public com.lutris.logging.LogChannel getChannel()
Get the associate channel.


getLevel

public int getLevel()
Get the associate level.


println

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

Parameters:
msg - The message to log.
throwable - Exception or error to log.

EAF 6.4 Implementation