public class Log4jSyslogBackLogHandler extends AbstractSyslogBackLogHandler
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.
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.log4j.Level |
downLevel |
protected org.apache.log4j.Logger |
logger |
protected org.apache.log4j.Level |
upLevel |
appendReason| Constructor and Description |
|---|
Log4jSyslogBackLogHandler(Class loggerClass) |
Log4jSyslogBackLogHandler(Class loggerClass,
boolean appendReason) |
Log4jSyslogBackLogHandler(org.apache.log4j.Logger logger) |
Log4jSyslogBackLogHandler(org.apache.log4j.Logger logger,
boolean appendReason) |
Log4jSyslogBackLogHandler(String loggerName) |
Log4jSyslogBackLogHandler(String loggerName,
boolean appendReason) |
Log4jSyslogBackLogHandler(String loggerName,
org.apache.log4j.spi.LoggerFactory loggerFactory) |
Log4jSyslogBackLogHandler(String loggerName,
org.apache.log4j.spi.LoggerFactory loggerFactory,
boolean appendReason) |
| Modifier and Type | Method and Description |
|---|---|
void |
down(SyslogIF syslog,
String reason)
Implement down(syslog,reason) to notify/log when the syslog protocol is unavailable.
|
protected static org.apache.log4j.Level |
getLog4jLevel(int level) |
void |
initialize()
Implement initialize() to handle one-time set-up for this backLog handler.
|
void |
log(SyslogIF syslog,
int level,
String message,
String reason) |
void |
up(SyslogIF syslog)
Implement up(syslog) to notify/log when the syslog protocol becomes available after a down condition.
|
combineprotected org.apache.log4j.Logger logger
protected org.apache.log4j.Level downLevel
protected org.apache.log4j.Level upLevel
public Log4jSyslogBackLogHandler(org.apache.log4j.Logger logger)
throws SyslogRuntimeException
SyslogRuntimeExceptionpublic Log4jSyslogBackLogHandler(org.apache.log4j.Logger logger,
boolean appendReason)
public Log4jSyslogBackLogHandler(Class loggerClass)
public Log4jSyslogBackLogHandler(Class loggerClass, boolean appendReason)
public Log4jSyslogBackLogHandler(String loggerName)
public Log4jSyslogBackLogHandler(String loggerName, boolean appendReason)
public Log4jSyslogBackLogHandler(String loggerName, org.apache.log4j.spi.LoggerFactory loggerFactory)
public Log4jSyslogBackLogHandler(String loggerName, org.apache.log4j.spi.LoggerFactory loggerFactory, boolean appendReason)
public void initialize()
throws SyslogRuntimeException
SyslogBackLogHandlerIFSyslogRuntimeExceptionprotected static org.apache.log4j.Level getLog4jLevel(int level)
public void down(SyslogIF syslog, String reason)
SyslogBackLogHandlerIFsyslog - - SyslogIF instance causing this down conditionreason - - reason given for the down conditionpublic void up(SyslogIF syslog)
SyslogBackLogHandlerIFsyslog - - SyslogIF instance which is now availablepublic void log(SyslogIF syslog, int level, String message, String reason) throws SyslogRuntimeException
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 handledSyslogRuntimeException - - throwing this Exception activates the next backlogHandler in the chainCopyright © 2017. All rights reserved.