public class JSONEventLayoutV0
extends org.apache.log4j.Layout
| Modifier and Type | Field and Description |
|---|---|
static org.apache.commons.lang.time.FastDateFormat |
ISO_DATETIME_TIME_ZONE_FORMAT_WITH_MILLIS |
static TimeZone |
UTC |
| Constructor and Description |
|---|
JSONEventLayoutV0()
For backwards compatibility, the default is to generate location information
in the log messages.
|
JSONEventLayoutV0(boolean locationInfo)
Creates a layout that optionally inserts location information into log messages.
|
| Modifier and Type | Method and Description |
|---|---|
void |
activateOptions() |
static String |
dateFormat(long timestamp) |
String |
format(org.apache.log4j.spi.LoggingEvent loggingEvent) |
boolean |
getLocationInfo()
Query whether log messages include location information.
|
boolean |
ignoresThrowable() |
void |
setLocationInfo(boolean locationInfo)
Set whether log messages should include location information.
|
public static final TimeZone UTC
public static final org.apache.commons.lang.time.FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT_WITH_MILLIS
public JSONEventLayoutV0()
public JSONEventLayoutV0(boolean locationInfo)
locationInfo - whether or not to include location information in the log messages.public static String dateFormat(long timestamp)
public String format(org.apache.log4j.spi.LoggingEvent loggingEvent)
format in class org.apache.log4j.Layoutpublic boolean ignoresThrowable()
ignoresThrowable in class org.apache.log4j.Layoutpublic boolean getLocationInfo()
public void setLocationInfo(boolean locationInfo)
locationInfo - true if location information should be included, false otherwise.public void activateOptions()
Copyright © 2014. All Rights Reserved.