|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log.format.SyslogFormatter
A formatter that serializes in the format originally used by BSD syslog daemon.
Field Summary | |
static int |
FACILITY_AUTH
|
static int |
FACILITY_AUTHPRIV
|
static int |
FACILITY_CRON
|
static int |
FACILITY_DAEMON
|
protected static java.lang.String[] |
FACILITY_DESCRIPTIONS
|
static int |
FACILITY_FTP
|
static int |
FACILITY_KERN
|
static int |
FACILITY_LOCAL0
|
static int |
FACILITY_LOCAL1
|
static int |
FACILITY_LOCAL2
|
static int |
FACILITY_LOCAL3
|
static int |
FACILITY_LOCAL4
|
static int |
FACILITY_LOCAL5
|
static int |
FACILITY_LOCAL6
|
static int |
FACILITY_LOCAL7
|
static int |
FACILITY_LPR
|
static int |
FACILITY_MAIL
|
static int |
FACILITY_NEWS
|
static int |
FACILITY_SYSLOG
|
static int |
FACILITY_USER
|
static int |
FACILITY_UUCP
|
static int |
PRIORITY_ALERT
|
static int |
PRIORITY_CRIT
|
static int |
PRIORITY_DEBUG
|
static int |
PRIORITY_EMERG
|
static int |
PRIORITY_ERR
|
static int |
PRIORITY_INFO
|
static int |
PRIORITY_NOTICE
|
static int |
PRIORITY_WARNING
|
Constructor Summary | |
SyslogFormatter()
Constructor that assumes FACILITY_USER. |
|
SyslogFormatter(int facility)
Constructor so that you can associate facility with formatter. |
|
SyslogFormatter(int facility,
boolean showFacilityBanner)
Constructor allowing setting of facility and whether to show banner. |
Method Summary | |
java.lang.String |
format(LogEvent event)
Format log event into syslog string. |
protected java.lang.String |
getFacilityDescription(int facility)
Retrieve description for facility. |
protected int |
getSyslogFacility(LogEvent event)
Get facility associated with event. |
protected int |
getSyslogPriority(LogEvent event)
Get syslog priority code for LogEvent. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int PRIORITY_DEBUG
public static final int PRIORITY_INFO
public static final int PRIORITY_NOTICE
public static final int PRIORITY_WARNING
public static final int PRIORITY_ERR
public static final int PRIORITY_CRIT
public static final int PRIORITY_ALERT
public static final int PRIORITY_EMERG
public static final int FACILITY_KERN
public static final int FACILITY_USER
public static final int FACILITY_MAIL
public static final int FACILITY_DAEMON
public static final int FACILITY_AUTH
public static final int FACILITY_SYSLOG
public static final int FACILITY_LPR
public static final int FACILITY_NEWS
public static final int FACILITY_UUCP
public static final int FACILITY_CRON
public static final int FACILITY_AUTHPRIV
public static final int FACILITY_FTP
public static final int FACILITY_LOCAL0
public static final int FACILITY_LOCAL1
public static final int FACILITY_LOCAL2
public static final int FACILITY_LOCAL3
public static final int FACILITY_LOCAL4
public static final int FACILITY_LOCAL5
public static final int FACILITY_LOCAL6
public static final int FACILITY_LOCAL7
protected static final java.lang.String[] FACILITY_DESCRIPTIONS
Constructor Detail |
public SyslogFormatter()
public SyslogFormatter(int facility)
facility
- the facility constantpublic SyslogFormatter(int facility, boolean showFacilityBanner)
facility
- the facility code.showFacilityBanner
- true if facility banner should be shownMethod Detail |
public java.lang.String format(LogEvent event)
format
in interface Formatter
event
- the event
protected java.lang.String getFacilityDescription(int facility)
facility
- the facility code
protected int getSyslogFacility(LogEvent event)
event
- the log event
protected int getSyslogPriority(LogEvent event)
event
- the log event
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |