pt.digitalis.log
Class LogWrapperLog4JImpl

java.lang.Object
  extended by pt.digitalis.log.BaseLogWrapper
      extended by pt.digitalis.log.LogWrapperLog4JImpl
All Implemented Interfaces:
ILogWrapper

public class LogWrapperLog4JImpl
extends BaseLogWrapper

This class provides an implementation of the logger API as specified by the interface ILogWrapper. This implementation is based upon the standard implementation base BaseLogWrapper.
This implementation uses Log4J as its logging platform.

Author:
Pedro Viegas pviegas@digitalis.pt, Rodrigo Gonçalves rgoncalves@digitalis.pt

Field Summary
 
Fields inherited from class pt.digitalis.log.BaseLogWrapper
indentationString
 
Constructor Summary
LogWrapperLog4JImpl()
          Default constructor.
LogWrapperLog4JImpl(String loggerName)
          Creates a new logger with the name supplied as a parameter and promotes its initialization.
 
Method Summary
protected  void applyCustomConfiguration()
          Current Logger implementation custom configurations.
 LogLevel getLevel()
          Inspector for the LogWrapper level
 void setLevel(LogLevel level)
          Sets the log level to the given LogLevel.
protected  void writeLog(LogLevel level, Object message)
          Executes the actual writting operation of the LOG.
 
Methods inherited from class pt.digitalis.log.BaseLogWrapper
debug, decreaseIndentation, error, fatal, getIndentationString, increaseIndentation, info, isDebugEnabled, isErrorEnabled, isFatalEnabled, isInfoEnabled, isTraceEnabled, isWarnEnabled, log, setDebugLogLevel, setErrorLogLevel, setFatalLogLevel, setInfoLogLevel, setTraceLogLevel, setWarnLogLevel, trace, warn
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LogWrapperLog4JImpl

public LogWrapperLog4JImpl()
Default constructor. Creates a new logger and promotes its initialization.


LogWrapperLog4JImpl

public LogWrapperLog4JImpl(String loggerName)
Creates a new logger with the name supplied as a parameter and promotes its initialization.

Parameters:
loggerName - the logger name
Method Detail

applyCustomConfiguration

protected void applyCustomConfiguration()
Current Logger implementation custom configurations. This method is intended to provide the custom implementation for the current Logger implementation. If one wishes to provide their own this method should be overriden and used for this purpose. This method is called within the Initialization process.


writeLog

protected void writeLog(LogLevel level,
                        Object message)
Description copied from class: BaseLogWrapper
Executes the actual writting operation of the LOG. Is called from the method BaseLogWrapper.log(LogLevel, Object) and receives the interpreted message to write (including identation)

Specified by:
writeLog in class BaseLogWrapper
Parameters:
level - the LogLevel
message - the compiled message to write to log
See Also:
BaseLogWrapper.writeLog(pt.digitalis.log.LogLevel, java.lang.Object)

getLevel

public LogLevel getLevel()
Description copied from interface: ILogWrapper
Inspector for the LogWrapper level

Returns:
the actual LogLevel
See Also:
ILogWrapper.getLevel()

setLevel

public void setLevel(LogLevel level)
Description copied from interface: ILogWrapper
Sets the log level to the given LogLevel.

Parameters:
level - the new LogLevel
See Also:
ILogWrapper.setLevel(pt.digitalis.log.LogLevel)


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