Logging¶
The library uses the built-in logger from java.util.logging.
It configures to not use the parent logger and places a new ConsoleHandler
on static initialization. This outputs the log in formatted lines like:
1 | |
This will not change visual presentation based on any localization.
change log-level¶
Default is to use INFO-level. You can change the used level:
1 | |
The parameter passed is of type java.util.logging.Level.
test logging output¶
To test if the logging as such works, you can pass a test string:
1 | |
This message will be logged by the Logging-class own Logger,
once per level.
set custom formatter¶
If you need another format, you can replace the default formatter of this lib by calling:
1 | |
This formatter has to be of type java.util.logging.Formatter