consciouscode.logging
Class TeeLog

java.lang.Object
  extended by consciouscode.logging.AbstractLog
      extended by consciouscode.logging.TeeLog
All Implemented Interfaces:
Log

public class TeeLog
extends AbstractLog

Log implementation that sends all messages to a series of target logs.


Field Summary
 
Fields inherited from class consciouscode.logging.AbstractLog
DEBUG, ERROR, FATAL, INFO, myLogLevel, NONE, TRACE, WARN
 
Constructor Summary
TeeLog()
          Constructs a log that discards all messages.
TeeLog(Log[] targetLogs)
           
 
Method Summary
 void debug(Object message, Throwable cause)
           
protected  void doLog(int level, Object message, Throwable exception)
           
protected  void doLog(String message, Throwable exception)
           
 void error(Object message, Throwable cause)
           
 void fatal(Object message, Throwable cause)
           
 Log[] getTargetLogs()
           
 void info(Object message, Throwable cause)
           
 void setTargetLogs(Log[] targetLogs)
           
 void trace(Object message, Throwable cause)
           
 void warn(Object message, Throwable cause)
           
 
Methods inherited from class consciouscode.logging.AbstractLog
debug, error, fatal, info, isDebugEnabled, isErrorEnabled, isFatalEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, setLogLevel, trace, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TeeLog

public TeeLog()
Constructs a log that discards all messages. You probably want to call setTargetLogs(org.apache.commons.logging.Log[]) next in order to make this object do something useful.


TeeLog

public TeeLog(Log[] targetLogs)
Method Detail

getTargetLogs

public Log[] getTargetLogs()

setTargetLogs

public void setTargetLogs(Log[] targetLogs)

trace

public void trace(Object message,
                  Throwable cause)
Specified by:
trace in interface Log
Overrides:
trace in class AbstractLog

debug

public void debug(Object message,
                  Throwable cause)
Specified by:
debug in interface Log
Overrides:
debug in class AbstractLog

info

public void info(Object message,
                 Throwable cause)
Specified by:
info in interface Log
Overrides:
info in class AbstractLog

warn

public void warn(Object message,
                 Throwable cause)
Specified by:
warn in interface Log
Overrides:
warn in class AbstractLog

error

public void error(Object message,
                  Throwable cause)
Specified by:
error in interface Log
Overrides:
error in class AbstractLog

fatal

public void fatal(Object message,
                  Throwable cause)
Specified by:
fatal in interface Log
Overrides:
fatal in class AbstractLog

doLog

protected void doLog(int level,
                     Object message,
                     Throwable exception)
Overrides:
doLog in class AbstractLog

doLog

protected void doLog(String message,
                     Throwable exception)
Specified by:
doLog in class AbstractLog


Copyright © 2001–2012 Todd V. Jonker. All Rights Reserved.