org.productivity.java.syslog4j.impl.backlog
Class Syslog4jBackLogHandler
java.lang.Object
org.productivity.java.syslog4j.impl.backlog.AbstractSyslogBackLogHandler
org.productivity.java.syslog4j.impl.backlog.Syslog4jBackLogHandler
- All Implemented Interfaces:
- SyslogBackLogHandlerIF
public class Syslog4jBackLogHandler
- extends AbstractSyslogBackLogHandler
Syslog4jBackLogHandler is used to send Syslog backLog messages to
another Syslog4j protocol whenever the main Syslog protocol fails.
Syslog4j is licensed under the Lesser GNU Public License v2.1. A copy
of the LGPL license is available in the META-INF folder in all
distributions of Syslog4j and in the base directory of the "doc" ZIP.
- Version:
- $Id: Syslog4jBackLogHandler.java,v 1.1 2009/07/25 18:42:47 cvs Exp $
- Author:
- <syslog4j@productivity.org>
Method Summary |
void |
down(SyslogIF syslog,
java.lang.String reason)
Implement down(syslog,reason) to notify/log when the syslog protocol is unavailable. |
void |
initialize()
Implement initialize() to handle one-time set-up for this backLog handler. |
void |
log(SyslogIF syslog,
int level,
java.lang.String message,
java.lang.String reason)
|
void |
up(SyslogIF syslog)
Implement up(syslog) to notify/log when the syslog protocol becomes available after a down condition. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
syslog
protected SyslogIF syslog
downLevel
protected int downLevel
upLevel
protected int upLevel
Syslog4jBackLogHandler
public Syslog4jBackLogHandler(java.lang.String protocol)
Syslog4jBackLogHandler
public Syslog4jBackLogHandler(java.lang.String protocol,
boolean appendReason)
Syslog4jBackLogHandler
public Syslog4jBackLogHandler(SyslogIF syslog)
Syslog4jBackLogHandler
public Syslog4jBackLogHandler(SyslogIF syslog,
boolean appendReason)
initialize
public void initialize()
throws SyslogRuntimeException
- Description copied from interface:
SyslogBackLogHandlerIF
- Implement initialize() to handle one-time set-up for this backLog handler.
- Throws:
SyslogRuntimeException
log
public void log(SyslogIF syslog,
int level,
java.lang.String message,
java.lang.String reason)
throws SyslogRuntimeException
- Parameters:
syslog
- - SyslogIF instance which cannot handle this log eventlevel
- - message levelmessage
- - message (in String form)reason
- - reason given for why this message could not be handled
- Throws:
SyslogRuntimeException
- - throwing this Exception activates the next backlogHandler in the chain
down
public void down(SyslogIF syslog,
java.lang.String reason)
- Description copied from interface:
SyslogBackLogHandlerIF
- Implement down(syslog,reason) to notify/log when the syslog protocol is unavailable.
- Parameters:
syslog
- - SyslogIF instance causing this down conditionreason
- - reason given for the down condition
up
public void up(SyslogIF syslog)
- Description copied from interface:
SyslogBackLogHandlerIF
- Implement up(syslog) to notify/log when the syslog protocol becomes available after a down condition.
- Parameters:
syslog
- - SyslogIF instance which is now available