Class MethodLocationPatternConverter

All Implemented Interfaces:
LocationAware, PatternConverter

@Plugin(name="MethodLocationPatternConverter", category="Converter") public final class MethodLocationPatternConverter extends LogEventPatternConverter implements LocationAware
Returns the event's line location information in a StringBuilder.
  • Method Details

    • newInstance

      public static MethodLocationPatternConverter newInstance(String[] options)
      Obtains an instance of MethodLocationPatternConverter.
      Parameters:
      options - options, may be null.
      Returns:
      instance of MethodLocationPatternConverter.
    • format

      public void format(LogEvent event, StringBuilder toAppendTo)
      Formats an event into a string buffer.
      Specified by:
      format in class LogEventPatternConverter
      Parameters:
      event - event to format, may not be null.
      toAppendTo - string buffer to which the formatted event will be appended. May not be null.
    • requiresLocation

      public boolean requiresLocation()
      Specified by:
      requiresLocation in interface LocationAware