Class LogstashCommonFieldNames

java.lang.Object
net.logstash.logback.fieldnames.LogstashCommonFieldNames
Direct Known Subclasses:
LogstashAccessFieldNames, LogstashFieldNames

public abstract class LogstashCommonFieldNames extends Object
Common field names between the regular LogstashFormatter and the LogstashAccessFormatter.
  • Field Details

    • IGNORE_FIELD_INDICATOR

      public static final String 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

      public String getTimestamp()
    • setTimestamp

      public void setTimestamp(String timestamp)
    • getVersion

      public String getVersion()
    • setVersion

      public void setVersion(String version)
    • getMessage

      public String getMessage()
    • setMessage

      public void setMessage(String message)
    • getContext

      public String 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

      public void setContext(String context)
    • getThread

      public String getThread()
    • setThread

      public void setThread(String thread)
    • getUuid

      public String getUuid()
    • setUuid

      public void setUuid(String uuid)