org.shiftone.jrat.util.log.target
Class ProxyLogTarget

java.lang.Object
  extended by org.shiftone.jrat.util.log.target.ProxyLogTarget
All Implemented Interfaces:
Constants, LogTarget

public class ProxyLogTarget
extends java.lang.Object
implements LogTarget, Constants

This class is an indirection layer to the "real" LogTarget. This makes it possible to switch the LogTarget that is being used by many LogTargetLog instances in one statement.

Author:
jeff@shiftone.org (Jeff Drost)

Field Summary
 
Fields inherited from interface org.shiftone.jrat.util.log.Constants
DEFAULT_LEVEL, LEVEL_DEBUG, LEVEL_ERROR, LEVEL_FATAL, LEVEL_INFO, LEVEL_NAMES, LEVEL_TRACE, LEVEL_WARN
 
Constructor Summary
ProxyLogTarget(LogTarget logTarget)
           
 
Method Summary
 int getCurrentLevel()
           
 LogTarget getLogTarget()
           
 boolean isLevelEnabled(java.lang.String topic, int level)
           
 void log(java.lang.String topic, int level, java.lang.Object message, java.lang.Throwable throwable)
           
 void setCurrentLevel(int currentLevel)
           
 void setLogTarget(LogTarget logTarget)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProxyLogTarget

public ProxyLogTarget(LogTarget logTarget)
Method Detail

isLevelEnabled

public boolean isLevelEnabled(java.lang.String topic,
                              int level)
Specified by:
isLevelEnabled in interface LogTarget

getLogTarget

public LogTarget getLogTarget()

setLogTarget

public void setLogTarget(LogTarget logTarget)

getCurrentLevel

public int getCurrentLevel()

setCurrentLevel

public void setCurrentLevel(int currentLevel)

log

public void log(java.lang.String topic,
                int level,
                java.lang.Object message,
                java.lang.Throwable throwable)
Specified by:
log in interface LogTarget