org.apache.logging.log4j.core.layout
Class SyslogLayout
java.lang.Object
org.apache.logging.log4j.core.layout.AbstractLayout<String>
org.apache.logging.log4j.core.layout.AbstractStringLayout
org.apache.logging.log4j.core.layout.SyslogLayout
- All Implemented Interfaces:
- Layout<String>
public class SyslogLayout
- extends AbstractStringLayout
Formats a log event as a BSD Log record.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
NEWLINE_PATTERN
public static final Pattern NEWLINE_PATTERN
- Match newlines in a platform-independent manner.
SyslogLayout
protected SyslogLayout(Facility facility,
boolean includeNL,
String escapeNL,
Charset c)
toSerializable
public String toSerializable(LogEvent event)
- Formats a
LogEvent
in conformance with the log4j.dtd.
- Parameters:
event
- The LogEvent
- Returns:
- the event formatted as a String.
createLayout
public static SyslogLayout createLayout(String facility,
String includeNL,
String escapeNL,
String charsetName)
- Create a SyslogLayout.
- Parameters:
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.
- Returns:
- A SyslogLayout.
Copyright © 1999-2013 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.