public class JSONEventLayoutV1
extends org.apache.log4j.Layout
| Modifier and Type | Field and Description |
|---|---|
static String |
ADDITIONAL_DATA_PROPERTY |
static org.apache.commons.lang.time.FastDateFormat |
ISO_DATETIME_TIME_ZONE_FORMAT_WITH_MILLIS |
static TimeZone |
UTC |
| Constructor and Description |
|---|
JSONEventLayoutV1()
For backwards compatibility, the default is to generate location information
in the log messages.
|
JSONEventLayoutV1(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.
|
String |
getUserFields() |
boolean |
ignoresThrowable() |
void |
setLocationInfo(boolean locationInfo)
Set whether log messages should include location information.
|
void |
setUserFields(String userFields) |
public static final TimeZone UTC
public static final org.apache.commons.lang.time.FastDateFormat ISO_DATETIME_TIME_ZONE_FORMAT_WITH_MILLIS
public static final String ADDITIONAL_DATA_PROPERTY
public JSONEventLayoutV1()
public JSONEventLayoutV1(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 String getUserFields()
public void setUserFields(String userFields)
public void activateOptions()
Copyright © 2014. All Rights Reserved.