jPOS 1.6.7 API Documentation

org.jpos.util
Class Log4JListener

java.lang.Object
  extended by org.jpos.util.Log4JListener
All Implemented Interfaces:
java.util.EventListener, Configurable, ReConfigurable, LogListener

public class Log4JListener
extends java.lang.Object
implements LogListener, ReConfigurable

Since:
jPOS 1.3 This class acts as a simple bridge between jPOS's logging system and log4j. The jPOS realm is used as the log4j Logger and messages are by default logged with the DEBUG level. This can be changed by calling setLevel
Version:
$Revision: 2854 $ $Date: 2010-01-02 02:34:31 -0800 (Sat, 02 Jan 2010) $
Author:
Eoin P. FLood
See Also:
LogListener, LogEvent

Constructor Summary
Log4JListener()
          Create a new Log4JListener with DEBUG level.
 
Method Summary
 void close()
           
 LogEvent log(LogEvent ev)
           
 void setConfiguration(Configuration cfg)
          Expects the following properties: config - Configuration file path priority - Log4J priority (debug, info, warn, error) watch - interval (in ms) to monitor XML config file for changes
 void setLevel(int level)
           
 void setLevel(java.lang.String level)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Log4JListener

public Log4JListener()
Create a new Log4JListener with DEBUG level.

Method Detail

setLevel

public void setLevel(int level)

setLevel

public void setLevel(java.lang.String level)

close

public void close()

setConfiguration

public void setConfiguration(Configuration cfg)
                      throws ConfigurationException
Expects the following properties:

Specified by:
setConfiguration in interface Configurable
Parameters:
cfg - Configuration object
Throws:
ConfigurationException

log

public LogEvent log(LogEvent ev)
Specified by:
log in interface LogListener

jPOS.org