Package org.apache.logging.log4j.core.pattern
@Export
@Version("2.24.0")
package org.apache.logging.log4j.core.pattern
Provides classes implementing format specifiers in conversion patterns.
-
ClassDescriptionAbstractPatternConverter is an abstract class that provides the formatting functionality that derived classes need.Style pattern converter.Black style pattern converter.Blue style pattern converter.Cyan style pattern converter.Green style pattern converter.Magenta style pattern converter.Red style pattern converter.White style pattern converter.Yellow style pattern converter.Converts text into ANSI escape sequences.
PatternConverter
s implement this interface to accept an array of objects when formatting.Formats the class name of the site of the logging request.Identifies the keys that are associated with a PatternConverter.Converts and formats the event's date in a StringBuilder.Converter that encodes the output from a pattern using a specified format.Formats the EndOfBatch.Equals pattern converter.Equals ignore case pattern converter.Equals pattern converter.Outputs the Throwable portion of the LoggingEvent as a full stack trace unless this converter's option is 'short', where it just outputs the first line of the trace, or if the number of lines to print is explicitly specified.Formats a date by delegating toDatePatternConverter
.Returns the event's line location information in a StringBuilder.Modifies the output of a pattern converter for a specified minimum and maximum width and alignment.Format the event's line location information.Highlight pattern converter.TODO Renders an input as HTML output.Formats an integer.Renders an input as ANSI escaped output.Returns the event's level in a StringBuilder.Returns the event's line location information in a StringBuilder.Formats a line separator.Formats a string literal.LoggingEventPatternConverter is a base class for pattern converters that can format information from instances of LoggingEvent.Formats the Logger FQCN.Formats a logger name.Able to handle the contents of the LogEvent's MapMessage and either output the entire contents of the properties in a similar format to the java.util.Hashtable.toString(), or to output the value of a specific key within the Map.Returns events' full marker string in a StringBuilder.Appends an event's maker name to a StringBuilder.Max length pattern converter.Able to handle the contents of the LogEvent's MDC and either output the entire contents of the properties in a similar format to the java.util.Hashtable.toString(), or to output the value of a specific key within the property bundle when this pattern converter has the option set.Returns the event's rendered message in a StringBuilder.Returns the event's line location information in a StringBuilder.NameAbbreviator generates abbreviated logger and class names.Abstract base class for other pattern converters which can return only parts of their name.Converts and formats the event's nanoTime in a StringBuilder.Returns the event's NDC in a StringBuilder.Interface that all PatternConverters must implement.Most of the work of thePatternLayout
class is delegated to the PatternParser class.Renders input unchanged.Replace tokens in the LogEvent message.Replacement pattern converter.Returns the relative time in milliseconds since JVM Startup.Equals pattern converter.Outputs the Throwable portion of the LoggingEvent as a full stack trace unless this converter's option is 'short', where it just outputs the first line of the trace, or if the number of lines to print is explicitly specified.Formats the event sequence number.Style pattern converter.Renders an input to an output.Formats the event thread ID.Formats the event thread name.Formats the event thread priority.Outputs the Throwable portion of the LoggingEvent as a full stack trace unless this converter's option is 'short', where it just outputs the first line of the trace, or if the number of lines to print is explicitly specified.Formats the event sequence number.VariablesNotEmpty pattern converter.