Package log

Class Log4jDevelopmentPatternConverter

  • All Implemented Interfaces:

    public class Log4jDevelopmentPatternConverter
    extends org.apache.logging.log4j.core.pattern.LogEventPatternConverter
    Pattern converter for Log4j 2.x that adds a hyperlink for the calling class of the current log message. This is to be used in log4j configurations as part of a pattern layout. eg: See generic.log4jdev.xml for a working example.
    • Field Summary

      • Fields inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter

      • Fields inherited from interface org.apache.logging.log4j.core.pattern.PatternConverter

    • Constructor Summary

      Modifier Constructor Description
      protected Log4jDevelopmentPatternConverter​(java.lang.String name, java.lang.String style)
      Required constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void format​(org.apache.logging.log4j.core.LogEvent event, java.lang.StringBuilder toAppendTo)
      Appends the desired hyperlink to the existing event message.
      static Log4jDevelopmentPatternConverter newInstance​(java.lang.String[] options)
      Required instance method for all log4j 2.x converters.
      • Methods inherited from class org.apache.logging.log4j.core.pattern.LogEventPatternConverter

        format, handlesThrowable, isVariable
      • Methods inherited from class org.apache.logging.log4j.core.pattern.AbstractPatternConverter

        getName, getStyleClass
      • Methods inherited from class java.lang.Object

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

      • Log4jDevelopmentPatternConverter

        protected Log4jDevelopmentPatternConverter​(java.lang.String name,
                                                   java.lang.String style)
        Required constructor.
        name - the name of the converter
        style - the style of the converter
    • Method Detail

      • newInstance

        public static Log4jDevelopmentPatternConverter newInstance​(java.lang.String[] options)
        Required instance method for all log4j 2.x converters.
        options - unused
        new converter instance
      • format

        public void format​(org.apache.logging.log4j.core.LogEvent event,
                           java.lang.StringBuilder toAppendTo)
        Appends the desired hyperlink to the existing event message.
        Specified by:
        format in class org.apache.logging.log4j.core.pattern.LogEventPatternConverter
        event - the current log event
        toAppendTo - the string to append to