Unified JVM logging (JEP-158)

Creating a unified logging schema for the JVM was the central goal of JEP-158. Here is a high-level 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
  • Provide six levels of logging:
    • Error
    • Warning
    • Information
    • Debug
    • Trace
    • Develop
This is not an exhaustive list of goals. We will discuss JEP-158 in greater detail in Chapter 14, Command Line Flags.

The changes to the JVM, in the context of logging, can be categorized into:

  • Tags
  • Levels
  • Decorations
  • Output
  • Command-line options

Let's briefly look at these categories.

Get Java 9: Building Robust Modular Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.