com.cafesoft.cams.log
Class CamsTraceLogger

java.lang.Object
  |
  +--com.cafesoft.cams.log.CamsTraceLogger
All Implemented Interfaces:
Logger

public class CamsTraceLogger
extends Object
implements Logger

A specialized Logger object that will send debug messages that are of the level INFO and DEBUG to a specified file. However, the Logger object will also send messages of the levels WARNING, ERROR, and FATAL to both the same specified file and to the System.err stream. Configuration properties supported by this Logger include:

Since:
7/15/02

Field Summary
 
Fields inherited from interface com.cafesoft.core.log.Logger
DEBUG, ERROR, FATAL, INFO, WARNING
 
Constructor Summary
CamsTraceLogger()
           
 
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 filter)
          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
 

Constructor Detail

CamsTraceLogger

public CamsTraceLogger()
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 final void setMessageFilter(MessageFilter filter)
Set a message filter.

Specified by:
setMessageFilter in interface Logger
Parameters:
filter - 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 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.