Unified JVM Logging [JEP 158]
Creating a unified logging schema for the JVM was the central goal of JEP-158. Here is a comprehensive list of the goals of the JEP:
- Create a JVM-wide set of command-line options for all logging operations
- Use categorized tags for logging
- Permit messages to have multiple tags, also referred to as tag sets
- Provide six levels of logging:
- Error
- Warning
- Information
- Debug
- Trace
- Develop
- Select which messages are logged based on levels
- Optionally direct logging to the console or a file
- Print one line at a time and do not support interleaving within the same line
- Permit output of multiple line logs (non-interleaved)
- Format all logging messages so that they are easily human-read
- Add decorations such as uptime, level, and tags
- Like levels, select which messages are logged based on decorations
- Convert pre-Java 9
tty>print
logging to use unified logging as the output - Permit dynamic message configuration using
jcmd
andMBeans
- Permit the ability to enable and disable individual log messages...