Class JsonFormatter

java.lang.Object
java.util.logging.Formatter
org.jboss.logmanager.ExtFormatter
org.jboss.logmanager.formatters.StructuredFormatter
org.jboss.logmanager.formatters.JsonFormatter
io.quarkus.logging.json.runtime.JsonFormatter

public class JsonFormatter extends org.jboss.logmanager.formatters.JsonFormatter
  • Nested Class Summary

    Nested classes/interfaces inherited from class org.jboss.logmanager.formatters.StructuredFormatter

    org.jboss.logmanager.formatters.StructuredFormatter.ExceptionOutputType, org.jboss.logmanager.formatters.StructuredFormatter.Generator, org.jboss.logmanager.formatters.StructuredFormatter.Key

    Nested classes/interfaces inherited from class org.jboss.logmanager.ExtFormatter

    org.jboss.logmanager.ExtFormatter.Delegating
  • Constructor Summary

    Constructors
    Constructor
    Description
    Creates a new JSON formatter.
    JsonFormatter(String keyOverrides)
    Creates a new JSON formatter.
    JsonFormatter(String keyOverrides, Set<String> excludedKeys, Map<String,AdditionalFieldConfig> additionalFields)
    Creates a new JSON formatter.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    after(org.jboss.logmanager.formatters.StructuredFormatter.Generator generator, org.jboss.logmanager.ExtLogRecord record)
     
    protected org.jboss.logmanager.formatters.StructuredFormatter.Generator
     
     
     
    void
     
    void
    setExcludedKeys(Set<String> excludedKeys)
     

    Methods inherited from class org.jboss.logmanager.formatters.JsonFormatter

    isPrettyPrint, setPrettyPrint

    Methods inherited from class org.jboss.logmanager.formatters.StructuredFormatter

    before, format, getDateTimeFormatter, getExceptionOutputType, getKey, getKeyOverrides, getMetaData, getRecordDelimiter, getZoneId, isCallerCalculationRequired, isDetailedExceptionOutputType, isFormattedExceptionOutputType, isPrintDetails, setDateFormat, setExceptionOutputType, setMetaData, setPrintDetails, setRecordDelimiter, setZoneId

    Methods inherited from class org.jboss.logmanager.ExtFormatter

    format, formatMessage, formatMessageLegacy, formatMessageNone, formatMessagePrintf, wrap

    Methods inherited from class java.util.logging.Formatter

    getHead, getTail

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • JsonFormatter

      public JsonFormatter()
      Creates a new JSON formatter.
    • JsonFormatter

      public JsonFormatter(String keyOverrides)
      Creates a new JSON formatter.
      Parameters:
      keyOverrides - a string representation of a map to override keys "@see org.jboss.logmanager.ext.PropertyValues#stringToEnumMap(Class, String)"
    • JsonFormatter

      public JsonFormatter(String keyOverrides, Set<String> excludedKeys, Map<String,AdditionalFieldConfig> additionalFields)
      Creates a new JSON formatter.
      Parameters:
      keyOverrides - a string representation of a map to override keys "@see org.jboss.logmanager.ext.PropertyValues#stringToEnumMap(Class, String)"
      excludedKeys - a list of keys to be excluded when writing the output
      additionalFields - additionalFields to be added to the output
  • Method Details

    • getExcludedKeys

      public Set<String> getExcludedKeys()
    • setExcludedKeys

      public void setExcludedKeys(Set<String> excludedKeys)
    • getAdditionalFields

      public Map<String,AdditionalFieldConfig> getAdditionalFields()
    • setAdditionalFields

      public void setAdditionalFields(Map<String,AdditionalFieldConfig> additionalFields)
    • createGenerator

      protected org.jboss.logmanager.formatters.StructuredFormatter.Generator createGenerator(Writer writer)
      Overrides:
      createGenerator in class org.jboss.logmanager.formatters.JsonFormatter
    • after

      protected void after(org.jboss.logmanager.formatters.StructuredFormatter.Generator generator, org.jboss.logmanager.ExtLogRecord record) throws Exception
      Overrides:
      after in class org.jboss.logmanager.formatters.StructuredFormatter
      Throws:
      Exception