org.objectweb.dream.util
Class NullLogger

java.lang.Object
  extended byorg.objectweb.dream.util.NullLogger
All Implemented Interfaces:
Handler, Logger

public class NullLogger
extends Object
implements Logger

A null logger each method is empty. This class can be used in a component if there is no logger rather than test each logging code line if the logger is null


Field Summary
static NullLogger NULL_LOGGER
          The unique instance of this class.
 
Fields inherited from interface org.objectweb.util.monolog.api.Handler
APPEND_MODE_ATTRIBUTE, CONSOLE_HANDLER_TYPE, FILE_HANDLER_TYPE, FILE_NUMBER_ATTRIBUTE, GENERIC_HANDLER_TYPE, LOGGER_HANDLER_TYPE, MAX_SIZE_ATTRIBUTE, OUTPUT_ATTRIBUTE, PATTERN_ATTRIBUTE, ROLLING_FILE_HANDLER_TYPE
 
Constructor Summary
protected NullLogger()
          Protected constructor, use NULL_LOGGERrather construct a new instance.
 
Method Summary
 Object getAttribute(String arg0)
           
 String[] getAttributeNames()
           
 int getCurrentIntLevel()
          returns BasicLevel.FATAL
 Level getCurrentLevel()
          returns BasicLevel.LEVEL_FATAL
 String getName()
           
 byte getType()
           
 boolean isLoggable(int arg0)
          returns false
 boolean isLoggable(Level arg0)
          returns false
 boolean isOn()
          returns false
 void log(int arg0, Object arg1)
           
 void log(int arg0, Object arg1, Object arg2, Object arg3)
           
 void log(int arg0, Object arg1, Throwable arg2)
           
 void log(int arg0, Object arg1, Throwable arg2, Object arg3, Object arg4)
           
 void log(Level arg0, Object arg1)
           
 void log(Level arg0, Object arg1, Object arg2, Object arg3)
           
 void log(Level arg0, Object arg1, Throwable arg2)
           
 void log(Level arg0, Object arg1, Throwable arg2, Object arg3, Object arg4)
           
 Object setAttribute(String arg0, Object arg1)
           
 void setIntLevel(int arg0)
           
 void setLevel(Level arg0)
           
 void setName(String arg0)
           
 void turnOff()
           
 void turnOn()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NULL_LOGGER

public static final NullLogger NULL_LOGGER
The unique instance of this class.

Constructor Detail

NullLogger

protected NullLogger()
Protected constructor, use NULL_LOGGERrather construct a new instance.

Method Detail

setIntLevel

public void setIntLevel(int arg0)
Specified by:
setIntLevel in interface Logger
See Also:
Logger.setIntLevel(int)

setLevel

public void setLevel(Level arg0)
Specified by:
setLevel in interface Logger
See Also:
Logger.setLevel(org.objectweb.util.monolog.api.Level)

getCurrentIntLevel

public int getCurrentIntLevel()
returns BasicLevel.FATAL

Specified by:
getCurrentIntLevel in interface Logger
See Also:
Logger.getCurrentIntLevel()

getCurrentLevel

public Level getCurrentLevel()
returns BasicLevel.LEVEL_FATAL

Specified by:
getCurrentLevel in interface Logger
See Also:
Logger.getCurrentLevel()

isLoggable

public boolean isLoggable(int arg0)
returns false

Specified by:
isLoggable in interface Logger
See Also:
Logger.isLoggable(int)

isLoggable

public boolean isLoggable(Level arg0)
returns false

Specified by:
isLoggable in interface Logger
See Also:
Logger.isLoggable(org.objectweb.util.monolog.api.Level)

isOn

public boolean isOn()
returns false

Specified by:
isOn in interface Logger
See Also:
Logger.isOn()

log

public void log(int arg0,
                Object arg1)
Specified by:
log in interface Logger
See Also:
Logger.log(int, java.lang.Object)

log

public void log(Level arg0,
                Object arg1)
Specified by:
log in interface Logger
See Also:
Logger.log(org.objectweb.util.monolog.api.Level, java.lang.Object)

log

public void log(int arg0,
                Object arg1,
                Throwable arg2)
Specified by:
log in interface Logger
See Also:
Logger.log(int, java.lang.Object, java.lang.Throwable)

log

public void log(Level arg0,
                Object arg1,
                Throwable arg2)
Specified by:
log in interface Logger
See Also:
Logger.log(org.objectweb.util.monolog.api.Level, java.lang.Object, java.lang.Throwable)

log

public void log(int arg0,
                Object arg1,
                Object arg2,
                Object arg3)
Specified by:
log in interface Logger
See Also:
Logger.log(int, java.lang.Object, java.lang.Object, java.lang.Object)

log

public void log(Level arg0,
                Object arg1,
                Object arg2,
                Object arg3)
Specified by:
log in interface Logger
See Also:
Logger.log(org.objectweb.util.monolog.api.Level, java.lang.Object, java.lang.Object, java.lang.Object)

log

public void log(int arg0,
                Object arg1,
                Throwable arg2,
                Object arg3,
                Object arg4)
Specified by:
log in interface Logger
See Also:
Logger.log(int, java.lang.Object, java.lang.Throwable, java.lang.Object, java.lang.Object)

log

public void log(Level arg0,
                Object arg1,
                Throwable arg2,
                Object arg3,
                Object arg4)
Specified by:
log in interface Logger
See Also:
Logger.log(org.objectweb.util.monolog.api.Level, java.lang.Object, java.lang.Throwable, java.lang.Object, java.lang.Object)

turnOn

public void turnOn()
Specified by:
turnOn in interface Logger
See Also:
Logger.turnOn()

turnOff

public void turnOff()
Specified by:
turnOff in interface Logger
See Also:
Logger.turnOff()

getName

public String getName()
Specified by:
getName in interface Handler
See Also:
Handler.getName()

setName

public void setName(String arg0)
Specified by:
setName in interface Handler
See Also:
Handler.setName(java.lang.String)

getType

public byte getType()
Specified by:
getType in interface Handler
See Also:
Handler.getType()

getAttributeNames

public String[] getAttributeNames()
Specified by:
getAttributeNames in interface Handler
See Also:
Handler.getAttributeNames()

getAttribute

public Object getAttribute(String arg0)
Specified by:
getAttribute in interface Handler
See Also:
Handler.getAttribute(java.lang.String)

setAttribute

public Object setAttribute(String arg0,
                           Object arg1)
Specified by:
setAttribute in interface Handler
See Also:
Handler.setAttribute(java.lang.String, java.lang.Object)


Copyright © 2003, 2004 - INRIA Rhone-Alpes - All Rights Reserved.