net.logstash.log4j
Class JSONEventLayout
java.lang.Object
org.apache.log4j.Layout
net.logstash.log4j.JSONEventLayout
- All Implemented Interfaces:
- org.apache.log4j.spi.OptionHandler
public class JSONEventLayout
- extends org.apache.log4j.Layout
| Fields inherited from class org.apache.log4j.Layout |
LINE_SEP, LINE_SEP_LEN |
|
Constructor Summary |
JSONEventLayout()
For backwards compatibility, the default is to generate location information
in the log messages. |
JSONEventLayout(boolean locationInfo)
Creates a layout that optionally inserts location information into log messages. |
| Methods inherited from class org.apache.log4j.Layout |
getContentType, getFooter, getHeader |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
ISO_DATETIME_TIME_ZONE_FORMAT_WITH_MILLIS
public static final org.apache.commons.lang.time.FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT_WITH_MILLIS
JSONEventLayout
public JSONEventLayout()
- For backwards compatibility, the default is to generate location information
in the log messages.
JSONEventLayout
public JSONEventLayout(boolean locationInfo)
- Creates a layout that optionally inserts location information into log messages.
- Parameters:
locationInfo - whether or not to include location information in the log messages.
dateFormat
public static String dateFormat(long timestamp)
format
public String format(org.apache.log4j.spi.LoggingEvent loggingEvent)
- Specified by:
format in class org.apache.log4j.Layout
ignoresThrowable
public boolean ignoresThrowable()
- Specified by:
ignoresThrowable in class org.apache.log4j.Layout
getLocationInfo
public boolean getLocationInfo()
- Query whether log messages include location information.
- Returns:
- true if location information is included in log messages, false otherwise.
setLocationInfo
public void setLocationInfo(boolean locationInfo)
- Set whether log messages should include location information.
- Parameters:
locationInfo - true if location information should be included, false otherwise.
activateOptions
public void activateOptions()
Copyright © 2013. All Rights Reserved.