O'Reilly logo

Java 9 Cookbook by Nick Samoylov, Mohamed Sanaulla

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Unified logging for JVM

Java 9 implemented JEP 158: Unified JVM Logging, which requested to introduce a common logging system for all the components of the JVM. The main components of JVM include the following:

  • Class loader
  • Runtime data area
    • Stack area
    • Method area
    • Heap area
    • PC registers
    • Native method stack
  • Execution engine
    • Interpreter
    • The JIT compiler
    • Garbage collection
    • Native method interface JNI
    • Native method library

The log message of all these components can now be captured and analyzed using unified logging, turned on by the -Xlog option.

The main features of the new logging system are as follows:

  • Usage of the log levels: trace, debug, info, warning, error
  • Message tags that identify the JVM component, action, or message of a ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required