- All Implemented Interfaces:
Encoder<ILoggingEvent>
,ContextAware
,LifeCycle
http://ndjson.org/ https://datatracker.ietf.org/doc/html/rfc8259
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
static final String
Fields inherited from class ch.qos.logback.core.encoder.EncoderBase
started
Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase
context
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionbyte[]
encode
(ILoggingEvent event) Encode an event as bytes.byte[]
Get footer bytes.byte[]
Get header bytes.void
setWithArguments
(boolean withArguments) void
setWithContext
(boolean withContext) void
setWithFormattedMessage
(boolean withFormattedMessage) void
setWithKVPList
(boolean withKVPList) void
setWithLevel
(boolean withLevel) void
setWithLoggerName
(boolean withLoggerName) void
setWithMarkers
(boolean withMarkers) void
setWithMDC
(boolean withMDC) void
setWithMessage
(boolean withMessage) void
setWithNanoseconds
(boolean withNanoseconds) void
setWithSequenceNumber
(boolean withSequenceNumber) void
setWithThreadName
(boolean withThreadName) void
setWithThrowable
(boolean withThrowable) void
setWithTimestamp
(boolean withTimestamp) Methods inherited from class ch.qos.logback.core.encoder.EncoderBase
isStarted, start, stop
Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface ch.qos.logback.core.spi.ContextAware
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext
-
Field Details
-
CONTEXT_ATTR_NAME
- See Also:
-
NAME_ATTR_NAME
- See Also:
-
BIRTHDATE_ATTR_NAME
- See Also:
-
CONTEXT_PROPERTIES_ATTR_NAME
- See Also:
-
TIMESTAMP_ATTR_NAME
- See Also:
-
NANOSECONDS_ATTR_NAME
- See Also:
-
SEQUENCE_NUMBER_ATTR_NAME
- See Also:
-
LEVEL_ATTR_NAME
- See Also:
-
MARKERS_ATTR_NAME
- See Also:
-
THREAD_NAME_ATTR_NAME
- See Also:
-
MDC_ATTR_NAME
- See Also:
-
LOGGER_ATTR_NAME
- See Also:
-
MESSAGE_ATTR_NAME
- See Also:
-
FORMATTED_MESSAGE_ATTR_NAME
- See Also:
-
ARGUMENT_ARRAY_ATTR_NAME
- See Also:
-
KEY_VALUE_PAIRS_ATTR_NAME
- See Also:
-
THROWABLE_ATTR_NAME
- See Also:
-
CAUSE_ATTR_NAME
- See Also:
-
SUPPRESSED_ATTR_NAME
- See Also:
-
COMMON_FRAMES_COUNT_ATTR_NAME
- See Also:
-
CLASS_NAME_ATTR_NAME
- See Also:
-
METHOD_NAME_ATTR_NAME
- See Also:
-
STEP_ARRAY_NAME_ATTRIBUTE
- See Also:
-
-
Constructor Details
-
JsonEncoder
public JsonEncoder()
-
-
Method Details
-
headerBytes
Description copied from interface:Encoder
Get header bytes. This method is typically called upon opening of an output stream.- Returns:
- header bytes. Null values are allowed.
-
encode
Description copied from interface:Encoder
Encode an event as bytes.- Parameters:
event
-
-
setWithSequenceNumber
- Parameters:
withSequenceNumber
-- Since:
- 1.5.0
-
setWithTimestamp
- Parameters:
withTimestamp
-- Since:
- 1.5.0
-
setWithNanoseconds
- Parameters:
withNanoseconds
-- Since:
- 1.5.0
-
setWithLevel
-
setWithThreadName
-
setWithLoggerName
-
setWithContext
-
setWithMarkers
-
setWithMDC
-
setWithKVPList
-
setWithMessage
-
setWithArguments
-
setWithThrowable
-
setWithFormattedMessage
-