Class PseudoIsoSimpleFormatter
java.lang.Object
java.util.logging.Formatter
java.util.logging.SimpleFormatter
de.aristaflow.adept2.base.registry.PseudoIsoSimpleFormatter
This formats log entries similar to
SimpleFormatter except that it uses a pseudo ISO
format for the timestamp instead of a datetime format using the default locale of the JVM.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.util.logging.Formatter
formatMessage, getHead, getTail
-
Field Details
-
JUL_FORMAT_PROP_KEY
jdk.internal.logger.SimpleConsoleLogger.Formatting#JUL_FORMAT_PROP_KEY- See Also:
-
timeZone
The (default) timezone used for log entry timestamps. -
formatString
The format string for thisSimpleFormatter.
-
-
Constructor Details
-
PseudoIsoSimpleFormatter
public PseudoIsoSimpleFormatter()
-
-
Method Details
-
getFormat
Gets the format string to use with thisSimpleFormatter. This copies the logic implemented inSimpleFormatteras close as possible. It will be slightly different since it cannot access the internal classes used bySimpleFormatter.First the format string is retrieved as system property using
JUL_FORMAT_PROP_KEY. If this yields no format string, theLogManageris asked for the corresponding property. If this yields no format string either, the (copied) defaultjdk.internal.logger.SimpleConsoleLogger.Formatting#DEFAULT_FORMATwill be used except for the time whereDateTimeFormatter.ISO_OFFSET_DATE_TIMEwill be used but printing the name of the current default timezone instead of the corresponding offset.- Returns:
- The format string used for each log entry.
-
format
This uses the local time formatted as pseudo-ISO (if not re-configured) timestamp of the log entry.- Overrides:
formatin classSimpleFormatter
-