Top Description Fields Constructors Methods
org.apache.juli

public Class JdkLoggerFormatter

extends Formatter
Class Inheritance
Imports
java.util.logging.Formatter, .LogRecord

A more compact formatter. Equivalent log4j config:
 log4j.rootCategory=WARN, A1
 log4j.appender.A1=org.apache.log4j.ConsoleAppender
 log4j.appender.A1.layout=org.apache.log4j.PatternLayout
 log4j.appender.A1.Target=System.err
 log4j.appender.A1.layout.ConversionPattern=%r %-15.15c{2} %-1.1p %m %n
Example: 1130122891846 Http11BaseProtocol I Initializing Coyote HTTP/1.1 on http-8800
Author
Costin Manolache

Field Summary

Modifier and TypeField and Description
public static final int
public static final int
public static final int
public static final int
public static final int
public static final int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
format(LogRecord
the log record to be formatted.
record
)

Implements abstract java.util.logging.Formatter.format.

Format the given log record and return the formatted string.

Inherited from java.util.logging.Formatter:
formatMessagegetHeadgetTail

Field Detail

LOG_LEVEL_DEBUGback to summary
public static final int LOG_LEVEL_DEBUG
LOG_LEVEL_ERRORback to summary
public static final int LOG_LEVEL_ERROR
LOG_LEVEL_FATALback to summary
public static final int LOG_LEVEL_FATAL
LOG_LEVEL_INFOback to summary
public static final int LOG_LEVEL_INFO
LOG_LEVEL_TRACEback to summary
public static final int LOG_LEVEL_TRACE
LOG_LEVEL_WARNback to summary
public static final int LOG_LEVEL_WARN

Constructor Detail

JdkLoggerFormatterback to summary
public JdkLoggerFormatter()

Method Detail

formatback to summary
public String format(LogRecord record)

Implements abstract java.util.logging.Formatter.format.

Doc from java.util.logging.Formatter.format.

Format the given log record and return the formatted string.

The resulting formatted String will normally include a localized and formatted version of the LogRecord's message field. It is recommended to use the Formatter#formatMessage convenience method to localize and format the message field.

Parameters
record:LogRecord

the log record to be formatted.

Returns:String

the formatted log record

Annotations
@Override