Package log
Class Log4jDevelopmentPatternConverter
- java.lang.Object
-
- org.apache.logging.log4j.core.pattern.AbstractPatternConverter
-
- org.apache.logging.log4j.core.pattern.LogEventPatternConverter
-
- log.Log4jDevelopmentPatternConverter
-
- All Implemented Interfaces:
org.apache.logging.log4j.core.pattern.PatternConverter
@Plugin(name="DevPatternConverter", category="Converter") 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.
-
-
Constructor Summary
Constructors 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
-
-
-
-
Method Detail
-
newInstance
public static Log4jDevelopmentPatternConverter newInstance(java.lang.String[] options)
Required instance method for all log4j 2.x converters.- Parameters:
options
- unused- Returns:
- 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 classorg.apache.logging.log4j.core.pattern.LogEventPatternConverter
- Parameters:
event
- the current log eventtoAppendTo
- the string to append to
-
-