<simpleLogging>SimpleLogging facility. | Name | Description |
|---|---|
debug="..."
|
Alias for level="FINE|FINER|FINEST".
|
formatter="..."
|
The formatter to use. |
level="..."
|
Configures the amount of logging; more precisely: The level of the "root logger". |
noWarn="..."
|
Shorthand for level="WARNING": Messages of levels INFO and WARNING will be
suppressed.
|
normal="..."
|
Shorthand for level="INFO": Messages of level INFO ("normal output") and above
(WARNING and SEVERE) will be logged.
|
out="..."
|
Messages of levels INFO (inclusive) through WARNING (exclusive) will be written to the given file. |
quiet="..."
|
Shorthand for level="INFO": Messages of level INFO ("normal output") will be
suppressed.
|
spec="..."
|
Sets the level of the named loggers, adds the given handler on them and sets the given formatter on the handler. |
stdout="..."
|
Messages of levels INFO (inclusive) through WARNING (exclusive) will be written to STDOUT. |
verbose="..."
|
Shorthand for level="CONFIG": Messages of level CONFIG ("verbose output") will
be logged.
|
Default values are underlined.
out="output-file"stdout="true|false"level="level"| level | Levels logged to STDERR | Levels logged to STDOUT |
|---|---|---|
| SEVERE | SEVERE | - |
| WARNING | SEVERE, WARNING | - |
| INFO | SEVERE, WARNING | INFO |
| CONFIG | SEVERE, WARNING | INFO, CONFIG |
| FINE | SEVERE, WARNING FINE* |
INFO, CONFIG |
| FINER | SEVERE, WARNING FINE, FINER* |
INFO, CONFIG |
| FINEST | SEVERE, WARNING FINE, FINER, FINEST* |
INFO, CONFIG |
*: FINE, FINER and FINEST log records are printed with class, method, source and line number
The default is determined by a number of sources, e.g. the "logging.properties" file. However in
many cases, the level of the root logger will initially be INFO.
noWarn="true|false"level="WARNING": Messages of levels INFO and WARNING will be
suppressed. quiet="true|false"level="INFO": Messages of level INFO ("normal output") will be
suppressed. normal="true|false"level="INFO": Messages of level INFO ("normal output") and above
(WARNING and SEVERE) will be logged. verbose="true|false"level="CONFIG": Messages of level CONFIG ("verbose output") will
be logged. debug="FINE|FINER|FINEST"level="FINE|FINER|FINEST". spec="spec"The spec is parsed as follows:
spec := [ level ] [ ':' [ logger-names ] [ ':' [ handler ] [ ':' [ formatter ] ] ] ] logger-names := logger-name [ ',' logger-name ]...
The level component must be parsable by Level.parse(String), i.e. it must be a decimal
number, or one of SEVERE, WARNING, INFO, CONFIG, FINE, FINER,
FINEST or ALL.
The handler and formatter components denote expressions, with the
automatically imported packages "java.util.logging", "de.unkrig.commons.util.logging.handler" and
"de.unkrig.commons.util.logging.formatter".
Example spec:
FINE:de.unkrig:ConsoleHandler:FormatFormatter("%5$tF %5$tT.%5$tL %10$-20s %3$2d %8$s%9$s%n")
If any of the components of the spec is missing or empty, a reasonable default value is assumed:
ALL
StdoutHandler
MESSAGE_AND_EXCEPTION
formatter="spec"SimpleLogging.setFormatter(String)Copyright © 2019. All rights reserved.