org.objectweb.util.monolog.api
Interface Logger

All Superinterfaces:
Handler
All Known Subinterfaces:
TopicalLogger
All Known Implementing Classes:
BasicLogger, Logger, LoggerImpl, MonologCategory, MonologCategory

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, JMX_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

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


setLevel

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


getCurrentIntLevel

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


getCurrentLevel

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


isLoggable

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


isLoggable

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


isOn

boolean isOn()
Check if this logger is enabled.


log

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

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

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

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

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

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

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

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

void turnOn()
Enables this logger


turnOff

void turnOff()
Disables this logger