Package com.unboundid.util
Class MinimalLogFormatter
java.lang.Object
java.util.logging.Formatter
com.unboundid.util.MinimalLogFormatter
- All Implemented Interfaces:
Serializable
@NotMutable
@ThreadSafety(level=COMPLETELY_THREADSAFE)
public final class MinimalLogFormatter
extends Formatter
implements Serializable
This class provides a log formatter for use in the Java logging framework
that may be used to minimize the formatting applied to log messages.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringThe default format string that will be used for generating timestamps. -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new instance of this log formatter with the default settings.MinimalLogFormatter(String timestampFormat, boolean includeLevel, boolean lineBreakAfterHeader, boolean lineBreakAfterMessage) Creates a new instance of this log formatter with the provided configuration. -
Method Summary
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
Field Details
-
DEFAULT_TIMESTAMP_FORMAT
The default format string that will be used for generating timestamps.- See Also:
-
-
Constructor Details
-
MinimalLogFormatter
public MinimalLogFormatter()Creates a new instance of this log formatter with the default settings. Generated messages will include a timestamp generated using the format string "'['dd/MMM/yyyy:HH:mm:ss Z']'", will not include the log level, and will not include a line break after the timestamp or the message. -
MinimalLogFormatter
public MinimalLogFormatter(@Nullable String timestampFormat, boolean includeLevel, boolean lineBreakAfterHeader, boolean lineBreakAfterMessage) Creates a new instance of this log formatter with the provided configuration.- Parameters:
timestampFormat- The format string used to generate timestamps. If this isnull, then timestamps will not be included in log messages.includeLevel- Indicates whether to include the log level in the generated messages.lineBreakAfterHeader- Indicates whether to insert a line break after the timestamp and/or log level.lineBreakAfterMessage- Indicates whether to insert aline break after the generated message.
-
-
Method Details