|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.logging.log4j.core.layout.LayoutBase<String>
org.apache.logging.log4j.core.layout.AbstractStringLayout
org.apache.logging.log4j.core.layout.RFC5424Layout
public final class RFC5424Layout
Formats a log event in accordance with RFC 5424.
Field Summary | |
---|---|
static int |
DEFAULT_ENTERPRISE_NUMBER
Not a very good default - it is the Apache Software Foundation's enterprise number. |
static String |
DEFAULT_ID
The default event id. |
Fields inherited from class org.apache.logging.log4j.core.layout.LayoutBase |
---|
footer, header, LOGGER |
Method Summary | |
---|---|
static RFC5424Layout |
createLayout(String facility,
String id,
String ein,
String includeMDC,
String mdcId,
String includeNL,
String appName,
String msgId,
String excludes,
String includes,
String required,
String charset,
Configuration config)
Create the RFC 5424 Layout. |
String |
formatAs(LogEvent event)
Formats a LogEvent in conformance with the RFC 5424 Syslog specification. |
String |
getLocalHostname()
This method gets the network name of the machine we are running on. |
protected List<String> |
getMdcExcludes()
|
protected List<String> |
getMdcIncludes()
|
protected String |
getProcId()
|
String |
toString()
|
Methods inherited from class org.apache.logging.log4j.core.layout.AbstractStringLayout |
---|
format, getCharset |
Methods inherited from class org.apache.logging.log4j.core.layout.LayoutBase |
---|
getFooter, getHeader, setFooter, setHeader |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final int DEFAULT_ENTERPRISE_NUMBER
public static final String DEFAULT_ID
Method Detail |
---|
public String formatAs(LogEvent event)
LogEvent
in conformance with the RFC 5424 Syslog specification.
event
- The LogEvent.
protected String getProcId()
public String getLocalHostname()
protected List<String> getMdcExcludes()
protected List<String> getMdcIncludes()
public String toString()
toString
in class Object
public static RFC5424Layout createLayout(String facility, String id, String ein, String includeMDC, String mdcId, String includeNL, String appName, String msgId, String excludes, String includes, String required, String charset, Configuration config)
facility
- The Facility is used to try to classify the message.id
- The default structured data id to use when formatting according to RFC 5424.ein
- The IANA enterprise number.includeMDC
- Indicates whether data from the ThreadContextMap will be included in the RFC 5424 Syslog
record. Defaults to "true:.mdcId
- The id to use for the MDC Structured Data Element.includeNL
- If true, a newline will be appended to the end of the syslog record. The default is false.appName
- The value to use as the APP-NAME in the RFC 5424 syslog record.msgId
- The default value to be used in the MSGID field of RFC 5424 syslog records.excludes
- A comma separated list of mdc keys that should be excluded from the LogEvent.includes
- A comma separated list of mdc keys that should be included in the FlumeEvent.required
- A comma separated list of mdc keys that must be present in the MDC.charset
- The character set.config
- The Configuration. Some Converters require access to the Interpolator.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |