com.cafesoft.core.log
Class StandardMessageFilter

java.lang.Object
  |
  +--com.cafesoft.core.log.StandardMessageFilter
All Implemented Interfaces:
MessageFilter

public final class StandardMessageFilter
extends Object
implements MessageFilter

Standard implementation of the MessageFilter interface which simply accepts all messages.

Since:
06/22/05

Method Summary
 boolean accept(int level, Object source, String message)
          Tests whether or not the specified message should be logged.
 boolean accept(int level, Object source, String message, Throwable throwable)
          Tests whether or not the specified message should be logged.
static MessageFilter getInstance()
          Get the singleton instance of the StandardMessageFilter object.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getInstance

public static final MessageFilter getInstance()
Get the singleton instance of the StandardMessageFilter object.

Returns:
the single instance of the StandardMessageFilter.
Since:
1.0

accept

public boolean accept(int level,
                      Object source,
                      String message)
Tests whether or not the specified message should be logged.

Specified by:
accept in interface MessageFilter
Parameters:
level - the message level.
source - the object that invoked message logging.
message - the message.
Returns:
true if the message is to be logged, else false.
Since:
1.0

accept

public boolean accept(int level,
                      Object source,
                      String message,
                      Throwable throwable)
Tests whether or not the specified message should be logged.

Specified by:
accept in interface MessageFilter
Parameters:
level - the message level.
source - the object that invoked message logging.
message - the message.
throwable - the Exception or Error.
Returns:
true if the message is to be logged, else false.
Since:
1.0


Generated on 5:16:42 PM May 12, 2008, © 1996-2005 Cafésoft LLC. All rights reserved.