com.cafesoft.core.log
Class Log4JFileLogger

java.lang.Object
  |
  +--com.cafesoft.core.log.Log4JFileLogger
All Implemented Interfaces:
Logger

public class Log4JFileLogger
extends Object
implements Logger

Log4JFileLogger writes log messages to a File by delegating logging to Apache's Log4J API. Configuration properties supported by this Logger include:

Since:
4/15/02

Field Summary
protected  MessageFilter messageFilter
          The MessageFilter used to discriminate messages to be logged.
protected  Properties prop
          Configuration Properties.
 
Fields inherited from interface com.cafesoft.core.log.Logger
DEBUG, ERROR, FATAL, INFO, WARNING
 
Constructor Summary
Log4JFileLogger()
          Create a new Log4jFileLogger.
 
Method Summary
 void debug(Object source, String message)
          Log a debug message from the specified source object.
 void debug(Object source, String message, Throwable throwable)
          Log a debug message from the specified source object.
 void error(Object source, String message)
          Log a error message from the specified source object.
 void error(Object source, String message, Throwable throwable)
          Log a error message from the specified source object.
 void fatal(Object source, String message)
          Log a fatal message from the specified source object.
 void fatal(Object source, String message, Throwable throwable)
          Log a fatal message from the specified source object.
 void info(Object source, String message)
          Log an info message from the specified source object.
 void info(Object source, String message, Throwable throwable)
          Log an info message from the specified source object.
 void initialize(Properties prop)
          Initialize the Logger.
 void setMessageFilter(MessageFilter messageFilter)
          Set a message filter.
 void warning(Object source, String message)
          Log a warning message from the specified source object.
 void warning(Object source, String message, Throwable throwable)
          Log a warning message from the specified source object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

prop

protected Properties prop
Configuration Properties.


messageFilter

protected MessageFilter messageFilter
The MessageFilter used to discriminate messages to be logged.

Constructor Detail

Log4JFileLogger

public Log4JFileLogger()
Create a new Log4jFileLogger.

Method Detail

initialize

public void initialize(Properties prop)
                throws LoggerException
Initialize the Logger.

Specified by:
initialize in interface Logger
Parameters:
prop - initialization Properties.
Throws:
LoggerException - if an error initializing the Logger.

setMessageFilter

public void setMessageFilter(MessageFilter messageFilter)
Set a message filter.

Specified by:
setMessageFilter in interface Logger
Parameters:
messageFilter - the MessageFilter that discriminates the messages to be logged.

debug

public void debug(Object source,
                  String message)
Log a debug message from the specified source object.

Specified by:
debug in interface Logger
Parameters:
source - the source of the message.
message - the debug message to be logged.

debug

public void debug(Object source,
                  String message,
                  Throwable throwable)
Log a debug message from the specified source object.

Specified by:
debug in interface Logger
Parameters:
source - the source of the message.
message - the debug message to be logged.
throwable - an Exception or Error to be logged.

info

public void info(Object source,
                 String message)
Log an info message from the specified source object.

Specified by:
info in interface Logger
Parameters:
source - the source of the message.
message - the info message to be logged.

info

public void info(Object source,
                 String message,
                 Throwable throwable)
Log an info message from the specified source object.

Specified by:
info in interface Logger
Parameters:
source - the source of the message.
message - the info message to be logged.
throwable - an Exception or Error to be logged.

warning

public void warning(Object source,
                    String message)
Log a warning message from the specified source object.

Specified by:
warning in interface Logger
Parameters:
source - the source of the message.
message - the info message to be logged.

warning

public void warning(Object source,
                    String message,
                    Throwable throwable)
Log a warning message from the specified source object.

Specified by:
warning in interface Logger
Parameters:
source - the source of the message.
message - the warning message to be logged.
throwable - an Exception or Error to be logged.

error

public void error(Object source,
                  String message)
Log a error message from the specified source object.

Specified by:
error in interface Logger
Parameters:
source - the source of the message.
message - the info message to be logged.

error

public void error(Object source,
                  String message,
                  Throwable throwable)
Log a error message from the specified source object.

Specified by:
error in interface Logger
Parameters:
source - the source of the message.
message - the error message to be logged.
throwable - an Exception or Error to be logged.

fatal

public void fatal(Object source,
                  String message)
Log a fatal message from the specified source object.

Specified by:
fatal in interface Logger
Parameters:
source - the source of the message.
message - the info message to be logged.

fatal

public void fatal(Object source,
                  String message,
                  Throwable throwable)
Log a fatal message from the specified source object.

Specified by:
fatal in interface Logger
Parameters:
source - the source of the message.
message - the fatal message to be logged.
throwable - an Exception or Error to be logged.


Generated on 8:41:50 AM June 06, 2005, © 1996-2005 Cafésoft LLC. All rights reserved.