Interface PatternConverter

All Known Subinterfaces:
ArrayPatternConverter
All Known Implementing Classes:
AbstractPatternConverter, AbstractStyleNameConverter, AbstractStyleNameConverter.Black, AbstractStyleNameConverter.Blue, AbstractStyleNameConverter.Cyan, AbstractStyleNameConverter.Green, AbstractStyleNameConverter.Magenta, AbstractStyleNameConverter.Red, AbstractStyleNameConverter.White, AbstractStyleNameConverter.Yellow, ClassNamePatternConverter, DatePatternConverter, EncodingPatternConverter, EndOfBatchPatternConverter, EqualsBaseReplacementConverter, EqualsIgnoreCaseReplacementConverter, EqualsReplacementConverter, ExtendedThrowablePatternConverter, FileLocationPatternConverter, FullLocationPatternConverter, HighlightConverter, IntegerPatternConverter, LevelPatternConverter, LineLocationPatternConverter, LineSeparatorPatternConverter, LiteralPatternConverter, LogEventPatternConverter, LoggerFqcnPatternConverter, LoggerPatternConverter, MapPatternConverter, MarkerPatternConverter, MarkerSimpleNamePatternConverter, MaxLengthConverter, MdcPatternConverter, MessagePatternConverter, MethodLocationPatternConverter, NamePatternConverter, NanoTimePatternConverter, NdcPatternConverter, ProcessIdPatternConverter, RegexReplacementConverter, RelativeTimePatternConverter, RepeatPatternConverter, RootThrowablePatternConverter, SequenceNumberPatternConverter, StyleConverter, ThreadIdPatternConverter, ThreadNamePatternConverter, ThreadPriorityPatternConverter, ThrowablePatternConverter, UuidPatternConverter, VariablesNotEmptyReplacementConverter

public interface PatternConverter
Interface that all PatternConverters must implement.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
    Main plugin category for PatternConverter plugins.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    format(Object obj, StringBuilder toAppendTo)
    Formats an object into a string buffer.
    Returns the name of the converter.
    This method returns the CSS style class that should be applied to the LoggingEvent passed as parameter, which can be null.
  • Field Details

    • CATEGORY

      static final String CATEGORY
      Main plugin category for PatternConverter plugins.
      Since:
      2.1
      See Also:
  • Method Details

    • format

      void format(Object obj, StringBuilder toAppendTo)
      Formats an object into a string buffer.
      Parameters:
      obj - event to format, may not be null.
      toAppendTo - string buffer to which the formatted event will be appended. May not be null.
    • getName

      String getName()
      Returns the name of the converter.
      Returns:
      The name of the converter.
    • getStyleClass

      String getStyleClass(Object e)
      This method returns the CSS style class that should be applied to the LoggingEvent passed as parameter, which can be null.
      Parameters:
      e - null values are accepted
      Returns:
      the name of the conversion pattern