org.objectweb.util.monolog.api
Interface Logger

All Superinterfaces:
Handler
All Known Subinterfaces:
TopicalLogger

public interface Logger
extends Handler

A Logger implementation receives event messages from an object and exports them. Each Logger is associated with a log level and discards log requests that are below this level. Furthermore the Logger interface extends the Handler interface and represents therefore a type of output.

Author:
S.Chassande-Barrioz

Field Summary
 
Fields inherited from interface org.objectweb.util.monolog.api.Handler
APPEND_MODE_ATTRIBUTE, BUFFER_ATTRIBUTE, CONSOLE_HANDLER_TYPE, FILE_HANDLER_TYPE, FILE_NUMBER_ATTRIBUTE, GENERIC_HANDLER_TYPE, LEVEL_ATTRIBUTE, LOGGER_HANDLER_TYPE, MAX_SIZE_ATTRIBUTE, OUTPUT_ATTRIBUTE, PATTERN_ATTRIBUTE, ROLLING_FILE_HANDLER_TYPE
 
Method Summary
 int getCurrentIntLevel()
          Returns the current level value under the integer format
 Level getCurrentLevel()
          Returns the current level value under the Level format
 boolean isLoggable(int level)
          Check if a message of the given level would actually be logged by this logger.
 boolean isLoggable(Level l)
          Check if a message of the given level would actually be logged by this logger.
 boolean isOn()
          Check if this logger is enabled.
 void log(int level, java.lang.Object message)
          Log a message, with no arguments.
 void log(int level, java.lang.Object message, java.lang.Object location, java.lang.Object method)
          Log a message, with a location and method arguments.
 void log(int level, java.lang.Object message, java.lang.Throwable throwable)
          Log a message, with a throwable arguments which can represent an error or a context..
 void log(int level, java.lang.Object message, java.lang.Throwable throwable, java.lang.Object location, java.lang.Object method)
          Log a message, with a location, method and throwable arguments.
 void log(Level level, java.lang.Object message)
          Log a message, with no arguments.
 void log(Level l, java.lang.Object message, java.lang.Object location, java.lang.Object method)
          Log a message, with a location and method arguments.
 void log(Level level, java.lang.Object message, java.lang.Throwable throwable)
          Log a message, with a throwable arguments which can represent an error or a context..
 void log(Level level, java.lang.Object message, java.lang.Throwable throwable, java.lang.Object location, java.lang.Object method)
          Log a message, with a location, method and throwable arguments.
 void setIntLevel(int level)
          Permits to set the level with an integer value
 void setLevel(Level l)
          Permits to set the level with a Level instance.
 void turnOff()
          Disables this logger
 void turnOn()
          Enables this logger
 
Methods inherited from interface org.objectweb.util.monolog.api.Handler
getAttribute, getAttributeNames, getName, getType, setAttribute, setName
 

Method Detail

setIntLevel

public void setIntLevel(int level)
Permits to set the level with an integer value


setLevel

public void setLevel(Level l)
Permits to set the level with a Level instance.


getCurrentIntLevel

public int getCurrentIntLevel()
Returns the current level value under the integer format


getCurrentLevel

public Level getCurrentLevel()
Returns the current level value under the Level format


isLoggable

public boolean isLoggable(int level)
Check if a message of the given level would actually be logged by this logger.


isLoggable

public boolean isLoggable(Level l)
Check if a message of the given level would actually be logged by this logger.


isOn

public boolean isOn()
Check if this logger is enabled.


log

public void log(int level,
                java.lang.Object message)
Log a message, with no arguments. If the logger is currently enabled for the given message level then the given message is treated


log

public void log(Level level,
                java.lang.Object message)
Log a message, with no arguments. If the logger is currently enabled for the given message level then the given message is treated


log

public void log(int level,
                java.lang.Object message,
                java.lang.Throwable throwable)
Log a message, with a throwable arguments which can represent an error or a context..


log

public void log(Level level,
                java.lang.Object message,
                java.lang.Throwable throwable)
Log a message, with a throwable arguments which can represent an error or a context..


log

public void log(int level,
                java.lang.Object message,
                java.lang.Object location,
                java.lang.Object method)
Log a message, with a location and method arguments. The location parameter can be the object instance which logs the event, or a string representation of the object. The method argument can be a java.lang.reflect.Method or a string which represents the method name.


log

public void log(Level l,
                java.lang.Object message,
                java.lang.Object location,
                java.lang.Object method)
Log a message, with a location and method arguments. The location parameter can be the object instance which logs the event, or a string representation of the object. The method argument can be a java.lang.reflect.Method or a string which represents the method name.


log

public void log(int level,
                java.lang.Object message,
                java.lang.Throwable throwable,
                java.lang.Object location,
                java.lang.Object method)
Log a message, with a location, method and throwable arguments. The location parameter can be the object instance which logs the event, or a string representation of the object.. The method argument can be a java.lang.reflect.Method or a string which represents the method name. The throwable parameter permits to log an Exception.


log

public void log(Level level,
                java.lang.Object message,
                java.lang.Throwable throwable,
                java.lang.Object location,
                java.lang.Object method)
Log a message, with a location, method and throwable arguments. The location parameter can be the object instance which logs the event, or a string representation of the object.. The method argument can be a java.lang.reflect.Method or a string which represents the method name. The throwable parameter permits to log an Exception.


turnOn

public void turnOn()
Enables this logger


turnOff

public void turnOff()
Disables this logger