org.productivity.java.syslog4j
Interface SyslogBackLogHandlerIF

All Known Implementing Classes:
AbstractSyslogBackLogHandler, Log4jSyslogBackLogHandler, NullSyslogBackLogHandler, PrintStreamSyslogBackLogHandler, Syslog4jBackLogHandler, SystemErrSyslogBackLogHandler, SystemOutSyslogBackLogHandler

public interface SyslogBackLogHandlerIF

SyslogBackLogHandlerIF provides a last-chance mechanism to log messages that fail (for whatever reason) within the rest of Syslog.

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.

Implementing the down(SyslogIF) method is an excellent way to add some sort of notification to your application when a Syslog service is unavailable.

Implementing the up(SyslogIF) method can be used to notify your application when a Syslog service has returned.

Version:
$Id: SyslogBackLogHandlerIF.java,v 1.2 2009/01/28 15:13:52 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.
 

Method Detail

initialize

void initialize()
                throws SyslogRuntimeException
Implement initialize() to handle one-time set-up for this backLog handler.

Throws:
SyslogRuntimeException

down

void down(SyslogIF syslog,
          java.lang.String reason)
Implement down(syslog,reason) to notify/log when the syslog protocol is unavailable.

Parameters:
syslog - - SyslogIF instance causing this down condition
reason - - reason given for the down condition

up

void up(SyslogIF syslog)
Implement up(syslog) to notify/log when the syslog protocol becomes available after a down condition.

Parameters:
syslog - - SyslogIF instance which is now available

log

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 event
level - - message level
message - - 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