Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.apache.log.format.SyslogFormatter
Field Summary | |
static int | |
static int | |
static int | |
static int | |
protected static String[] | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int | |
static int |
Constructor Summary | |
| |
| |
|
Method Summary | |
String | |
protected String |
|
protected int |
|
protected int |
|
public static final int FACILITY_AUTH
- Field Value:
- 32
public static final int FACILITY_AUTHPRIV
- Field Value:
- 80
public static final int FACILITY_CRON
- Field Value:
- 72
public static final int FACILITY_DAEMON
- Field Value:
- 24
protected static final String[] FACILITY_DESCRIPTIONS
public static final int FACILITY_FTP
- Field Value:
- 88
public static final int FACILITY_KERN
- Field Value:
- 0
public static final int FACILITY_LOCAL0
- Field Value:
- 128
public static final int FACILITY_LOCAL1
- Field Value:
- 136
public static final int FACILITY_LOCAL2
- Field Value:
- 144
public static final int FACILITY_LOCAL3
- Field Value:
- 152
public static final int FACILITY_LOCAL4
- Field Value:
- 160
public static final int FACILITY_LOCAL5
- Field Value:
- 168
public static final int FACILITY_LOCAL6
- Field Value:
- 176
public static final int FACILITY_LOCAL7
- Field Value:
- 184
public static final int FACILITY_LPR
- Field Value:
- 48
public static final int FACILITY_MAIL
- Field Value:
- 16
public static final int FACILITY_NEWS
- Field Value:
- 56
public static final int FACILITY_SYSLOG
- Field Value:
- 40
public static final int FACILITY_USER
- Field Value:
- 8
public static final int FACILITY_UUCP
- Field Value:
- 64
public static final int PRIORITY_ALERT
- Field Value:
- 1
public static final int PRIORITY_CRIT
- Field Value:
- 2
public static final int PRIORITY_DEBUG
- Field Value:
- 7
public static final int PRIORITY_EMERG
- Field Value:
- 0
public static final int PRIORITY_ERR
- Field Value:
- 3
public static final int PRIORITY_INFO
- Field Value:
- 6
public static final int PRIORITY_NOTICE
- Field Value:
- 5
public static final int PRIORITY_WARNING
- Field Value:
- 4
public SyslogFormatter()
Constructor that assumes FACILITY_USER.
public SyslogFormatter(int facility)
Constructor so that you can associate facility with formatter.
- Parameters:
facility
- the facility constant
public SyslogFormatter(int facility, boolean showFacilityBanner)
Constructor allowing setting of facility and whether to show banner.
- Parameters:
facility
- the facility code.showFacilityBanner
- true if facility banner should be shown
public String format(LogEvent event)
Format log event into syslog string.
- Parameters:
event
- the event
- Returns:
- the formatted string
protected String getFacilityDescription(int facility)
Retrieve description for facility.
- Parameters:
facility
- the facility code
- Returns:
- the facility description
protected int getSyslogFacility(LogEvent event)
Get facility associated with event. Default implementation returns facility set in constructor.
- Parameters:
event
- the log event
- Returns:
- the facility code
protected int getSyslogPriority(LogEvent event)
Get syslog priority code for LogEvent. This is done by translating LogKit priority to syslog priority.
- Parameters:
event
- the log event
- Returns:
- the priority code