public class SyslogLayout extends AbstractStringLayout
Modifier and Type | Field and Description |
---|---|
static Pattern |
NEWLINE_PATTERN
Match newlines in a platform-independent manner.
|
footer, header, LOGGER
Modifier | Constructor and Description |
---|---|
protected |
SyslogLayout(Facility facility,
boolean includeNL,
String escapeNL,
Charset charset) |
Modifier and Type | Method and Description |
---|---|
static SyslogLayout |
createLayout(String facility,
String includeNL,
String escapeNL,
String charsetName)
Create a SyslogLayout.
|
Map<String,String> |
getContentFormat()
SyslogLayout's content format is specified by:
Key: "structured" Value: "false"
Key: "dateFormat" Value: "MMM dd HH:mm:ss "
Key: "format" Value: "
|
String |
toSerializable(LogEvent event)
Formats a
LogEvent in conformance with the BSD Log record format. |
getCharset, getContentType, toByteArray
getFooter, getHeader, setFooter, setHeader
public static final Pattern NEWLINE_PATTERN
public String toSerializable(LogEvent event)
LogEvent
in conformance with the BSD Log record format.event
- The LogEventpublic Map<String,String> getContentFormat()
public static SyslogLayout createLayout(String facility, String includeNL, String escapeNL, String charsetName)
facility
- The Facility is used to try to classify the message.includeNL
- If true a newline will be appended to the result.escapeNL
- Pattern to use for replacing newlines.charsetName
- The character set.Copyright © 1999-2014 Apache Software Foundation. All Rights Reserved.
Apache Logging, Apache Log4j, Log4j, Apache, the Apache feather logo, the Apache Logging project logo, and the Apache Log4j logo are trademarks of The Apache Software Foundation.