Top Description Fields Constructors Methods
com.calendarfx.util

public Class LoggingFormatter

extends Formatter
Class Inheritance
Imports
java.io.PrintWriter, .StringWriter, java.time.Instant, .ZoneId, .ZonedDateTime, java.time.format.DateTimeFormatter, .FormatStyle, java.util.logging.Formatter, .Level, .LogRecord

A formatter for the logging framework. Formats logging messages in a very compact format.
Author
Dirk Lemmermann

Field Summary

Modifier and TypeField and Description
private static final DateTimeFormatter
private static int

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public synchronized String

Returns:

a formatted log record
format
(LogRecord
the log record to be formatted.
record
)

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

Format the given LogRecord.

private CharSequence
truncate(String s, int n)

Inherited from java.util.logging.Formatter:
formatMessagegetHeadgetTail

Field Detail

formatterback to summary
private static final DateTimeFormatter formatter
MAX_LEVEL_SIZEback to summary
private static int MAX_LEVEL_SIZE

Constructor Detail

LoggingFormatterback to summary
public LoggingFormatter()

Method Detail

formatback to summary
public synchronized String format(LogRecord record)

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

Format the given LogRecord.

Parameters
record:LogRecord

the log record to be formatted.

Returns:String

a formatted log record

Annotations
@Override
truncateback to summary
private CharSequence truncate(String s, int n)