Package net.logstash.logback.fieldnames
Class LogstashCommonFieldNames
java.lang.Object
net.logstash.logback.fieldnames.LogstashCommonFieldNames
- Direct Known Subclasses:
LogstashAccessFieldNames
,LogstashFieldNames
Common field names between the regular
LogstashFormatter
and the LogstashAccessFormatter
.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final String
Field name to use in logback configuration files if you want the field to be ignored (not output). -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionThe name of the context object field.getUuid()
void
setContext
(String context) void
setMessage
(String message) void
void
setTimestamp
(String timestamp) void
void
setVersion
(String version)
-
Field Details
-
IGNORE_FIELD_INDICATOR
Field name to use in logback configuration files if you want the field to be ignored (not output). Unfortunately, logback does not provide a way to set a field value to null via xml config, so we have to fall back to using this magic string. Note that if you're programmatically configuring the field names, then you can just set the field name to null in the FieldNamesType.- See Also:
-
-
Constructor Details
-
LogstashCommonFieldNames
public LogstashCommonFieldNames()
-
-
Method Details
-
getTimestamp
-
setTimestamp
-
getVersion
-
setVersion
-
getMessage
-
setMessage
-
getContext
The name of the context object field.If this returns
null
, then the context fields will be written inline at the root level of the JSON event output (e.g. as a sibling to all the other fields in this class).If this returns non-null, then the context fields will be written inside an object with field name returned by this method.
- Returns:
- The name of the context object field.
-
setContext
-
getThread
-
setThread
-
getUuid
-
setUuid
-