public class JSONEventLayout
extends ch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
| Constructor and Description |
|---|
JSONEventLayout() |
| Modifier and Type | Method and Description |
|---|---|
void |
addAdditionalField(AdditionalField p) |
String |
doLayout(ch.qos.logback.classic.spi.ILoggingEvent event)
Formats a
ILoggingEvent in conformity with the log4j.dtd. |
int |
getCallerStackIdx() |
String |
getContentType() |
boolean |
getLocationInfo()
Returns the current value of the LocationInfo option.
|
boolean |
getProperties()
Gets whether MDC key-value pairs should be output.
|
String |
getSource() |
String |
getSourceHost() |
String |
getSourcePath() |
List<String> |
getTags() |
String |
getType() |
void |
setCallerStackIdx(int callerStackIdx)
Location information dump with respect to call stack level.
|
void |
setLocationInfo(boolean flag)
The LocationInfo option takes a boolean value.
|
void |
setProperties(boolean flag)
Sets whether MDC key-value pairs should be output, default false.
|
void |
setSource(String source) |
void |
setSourceHost(String sourceHost) |
void |
setSourcePath(String sourcePath) |
void |
setTags(List<String> tags) |
void |
setType(String type) |
void |
start() |
getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeader, stopaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManagerpublic void start()
start in interface ch.qos.logback.core.spi.LifeCyclestart in class ch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>public void setLocationInfo(boolean flag)
If you are embedding this layout within an
org.apache.log4j.net.SMTPAppender then make sure to set the
LocationInfo option of that appender as well.
public boolean getLocationInfo()
public void setProperties(boolean flag)
flag - new value.public boolean getProperties()
public String doLayout(ch.qos.logback.classic.spi.ILoggingEvent event)
ILoggingEvent in conformity with the log4j.dtd.public String getContentType()
getContentType in interface ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent>getContentType in class ch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>public String getSource()
public void setSource(String source)
public String getSourceHost()
public void setSourceHost(String sourceHost)
public String getSourcePath()
public void setSourcePath(String sourcePath)
public String getType()
public void setType(String type)
public int getCallerStackIdx()
public void setCallerStackIdx(int callerStackIdx)
callerStackIdx - public void addAdditionalField(AdditionalField p)
Copyright © 2015. All rights reserved.