pt.digitalis.log
Interface ILogWrapper

All Known Implementing Classes:
BaseLogWrapper, LogWrapperLog4JImpl

public interface ILogWrapper

This interface defines a wrapper for a logging API. Accessing through this wrapper enables independency between the client and the logging technology.

Author:
Pedro Viegas pviegas@digitalis.pt

Method Summary
 void debug(Object message)
          Logs a message with 'Debug' Level.
 void decreaseIndentation()
          Decreases logging indentation
 void error(Object message)
          Logs a message with 'Error' Level.
 void fatal(Object message)
          Logs a message with 'Fatal' Level.
 String getIndentationString()
          Returns the indentation string
 LogLevel getLevel()
          Inspector for the LogWrapper level
 void increaseIndentation()
          Increases logging indentation.
 void info(Object message)
          Logs a message with 'Info' Level.
 boolean isDebugEnabled()
          Inspector for the LogWrapper 'Debug' level
 boolean isErrorEnabled()
          Inspector for the LogWrapper 'Error' level
 boolean isFatalEnabled()
          Inspector for the LogWrapper 'Fatal' level
 boolean isInfoEnabled()
          Inspector for the LogWrapper 'Info' level
 boolean isTraceEnabled()
          Inspector for the LogWrapper 'Trace' level
 boolean isWarnEnabled()
          Inspector for the LogWrapper 'Warn' level
 void log(LogLevel level, Object message)
          Logging method.
 void setDebugLogLevel()
          Sets the log level to 'Debug'.
 void setErrorLogLevel()
          Sets the log level to 'Error'.
 void setFatalLogLevel()
          Sets the log level to 'Fatal'.
 void setInfoLogLevel()
          Sets the log level to 'Info'.
 void setLevel(LogLevel level)
          Sets the log level to the given LogLevel.
 void setTraceLogLevel()
          Sets the log level to 'Trace'.
 void setWarnLogLevel()
          Sets the log level to 'Warn'.
 void trace(Object message)
          Logs a message with 'Trace' Level.
 void warn(Object message)
          Logs a message with 'Warn' Level.
 

Method Detail

trace

void trace(Object message)
Logs a message with 'Trace' Level.

Parameters:
message - the message to log

debug

void debug(Object message)
Logs a message with 'Debug' Level.

Parameters:
message - the message to log

info

void info(Object message)
Logs a message with 'Info' Level.

Parameters:
message - the message to log

warn

void warn(Object message)
Logs a message with 'Warn' Level.

Parameters:
message - the message to log

error

void error(Object message)
Logs a message with 'Error' Level.

Parameters:
message - the message to log

fatal

void fatal(Object message)
Logs a message with 'Fatal' Level.

Parameters:
message - the message to log

isTraceEnabled

boolean isTraceEnabled()
Inspector for the LogWrapper 'Trace' level

Returns:
T if the Trace Level is enabled on the LogWrapper, F otherwise

isDebugEnabled

boolean isDebugEnabled()
Inspector for the LogWrapper 'Debug' level

Returns:
T if the Debug Level is enabled on the LogWrapper, F otherwise

isInfoEnabled

boolean isInfoEnabled()
Inspector for the LogWrapper 'Info' level

Returns:
T if the Info Level is enabled on the LogWrapper, F otherwise

isWarnEnabled

boolean isWarnEnabled()
Inspector for the LogWrapper 'Warn' level

Returns:
T if the Warn Level is enabled on the LogWrapper, F otherwise

isErrorEnabled

boolean isErrorEnabled()
Inspector for the LogWrapper 'Error' level

Returns:
T if the Error Level is enabled on the LogWrapper, F otherwise

isFatalEnabled

boolean isFatalEnabled()
Inspector for the LogWrapper 'Fatal' level

Returns:
T if the Fatal level is enabled on the LogWrapper, F otherwise

getLevel

LogLevel getLevel()
Inspector for the LogWrapper level

Returns:
the actual LogLevel

setTraceLogLevel

void setTraceLogLevel()
Sets the log level to 'Trace'.


setDebugLogLevel

void setDebugLogLevel()
Sets the log level to 'Debug'.


setInfoLogLevel

void setInfoLogLevel()
Sets the log level to 'Info'.


setWarnLogLevel

void setWarnLogLevel()
Sets the log level to 'Warn'.


setErrorLogLevel

void setErrorLogLevel()
Sets the log level to 'Error'.


setFatalLogLevel

void setFatalLogLevel()
Sets the log level to 'Fatal'.


setLevel

void setLevel(LogLevel level)
Sets the log level to the given LogLevel.

Parameters:
level - the new LogLevel

log

void log(LogLevel level,
         Object message)
Logging method.

Parameters:
level - the log level
message - the message to log

increaseIndentation

void increaseIndentation()
Increases logging indentation.


decreaseIndentation

void decreaseIndentation()
Decreases logging indentation


getIndentationString

String getIndentationString()
Returns the indentation string

Returns:
the indentation string.


Copyright © 2010 Digitalis Informática Lda. All Rights Reserved.