Class JsonLayout
java.lang.Object
ch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
io.kokuwa.micronaut.logging.layout.JsonLayout
- All Implemented Interfaces:
ch.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent>,ch.qos.logback.core.spi.ContextAware,ch.qos.logback.core.spi.LifeCycle
- Direct Known Subclasses:
GcpJsonLayout
public class JsonLayout
extends ch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanprotected booleanstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class ch.qos.logback.core.LayoutBase
startedFields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voidprotected voidaddThrowableInfo(String fieldName, boolean field, ch.qos.logback.classic.spi.ILoggingEvent value, Map<String, Object> map) protected voidaddTimestamp(String key, boolean field, long timeStamp, Map<String, Object> map) doLayout(ch.qos.logback.classic.spi.ILoggingEvent event) protected StringformatTimestamp(long timestamp) voidsetIncludeContextName(boolean includeContextName) voidsetIncludeException(boolean includeException) voidsetIncludeFormattedMessage(boolean includeFormattedMessage) voidsetIncludeLevel(boolean includeLevel) voidsetIncludeLoggerName(boolean includeLoggerName) voidsetIncludeMDC(boolean includeMDC) voidsetIncludeMessage(boolean includeMessage) voidsetIncludeThreadName(boolean includeThreadName) voidsetIncludeTimestamp(boolean includeTimestamp) voidsetThrowableHandlingConverter(ch.qos.logback.classic.pattern.ThrowableHandlingConverter throwableHandlingConverter) voidsetTimestampFormat(String timestampFormat) voidsetTimestampFormatTimezoneId(String timestampFormatTimezoneId) voidstart()voidstop()toJsonMap(ch.qos.logback.classic.spi.ILoggingEvent event) Methods inherited from class ch.qos.logback.core.LayoutBase
getContext, getFileFooter, getFileHeader, getPresentationFooter, getPresentationHeader, isStarted, setContext, setFileFooter, setFileHeader, setPresentationFooter, setPresentationHeaderMethods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getDeclaredOrigin, getStatusManagerMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn
-
Field Details
-
TIMESTAMP_ATTR_NAME
- See Also:
-
LEVEL_ATTR_NAME
- See Also:
-
THREAD_ATTR_NAME
- See Also:
-
MDC_ATTR_NAME
- See Also:
-
LOGGER_ATTR_NAME
- See Also:
-
FORMATTED_MESSAGE_ATTR_NAME
- See Also:
-
MESSAGE_ATTR_NAME
- See Also:
-
EXCEPTION_ATTR_NAME
- See Also:
-
CONTEXT_ATTR_NAME
- See Also:
-
includeLevel
protected boolean includeLevel -
includeThreadName
protected boolean includeThreadName -
includeMDC
protected boolean includeMDC -
includeLoggerName
protected boolean includeLoggerName -
includeFormattedMessage
protected boolean includeFormattedMessage -
includeMessage
protected boolean includeMessage -
includeException
protected boolean includeException -
includeContextName
protected boolean includeContextName -
includeTimestamp
protected boolean includeTimestamp
-
-
Constructor Details
-
JsonLayout
public JsonLayout()
-
-
Method Details
-
getContentType
- Specified by:
getContentTypein interfacech.qos.logback.core.Layout<ch.qos.logback.classic.spi.ILoggingEvent>- Overrides:
getContentTypein classch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
start
public void start()- Specified by:
startin interfacech.qos.logback.core.spi.LifeCycle- Overrides:
startin classch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
stop
public void stop()- Specified by:
stopin interfacech.qos.logback.core.spi.LifeCycle- Overrides:
stopin classch.qos.logback.core.LayoutBase<ch.qos.logback.classic.spi.ILoggingEvent>
-
doLayout
-
toJsonMap
-
addThrowableInfo
-
addMap
-
addTimestamp
-
add
-
formatTimestamp
-
setIncludeLevel
public void setIncludeLevel(boolean includeLevel) -
setIncludeThreadName
public void setIncludeThreadName(boolean includeThreadName) -
setIncludeMDC
public void setIncludeMDC(boolean includeMDC) -
setIncludeLoggerName
public void setIncludeLoggerName(boolean includeLoggerName) -
setIncludeFormattedMessage
public void setIncludeFormattedMessage(boolean includeFormattedMessage) -
setIncludeMessage
public void setIncludeMessage(boolean includeMessage) -
setIncludeException
public void setIncludeException(boolean includeException) -
setIncludeContextName
public void setIncludeContextName(boolean includeContextName) -
setIncludeTimestamp
public void setIncludeTimestamp(boolean includeTimestamp) -
setTimestampFormat
-
setTimestampFormatTimezoneId
-
setThrowableHandlingConverter
public void setThrowableHandlingConverter(ch.qos.logback.classic.pattern.ThrowableHandlingConverter throwableHandlingConverter)
-