Command-line options

The new command-line option, -Xlog, was added to the logging framework in Java 9. This command-line option has an extensive array of parameters and possibilities. The basic syntax is simply -Xlog followed by an option. Here is the formal basic syntax:

-Xlog[:option]

Here is a basic example with the all option:

-Xlog:all

Here is the extensive command-line syntax used to configure the new unified logging:

-Xlog[:option]option          := [<what>][:[<output>][:[<decorators>][:<output-options>]]]                   'help'                   'disable'what            := <selector>[,...]selector        := <tag-set>[*][=<level>]tag-set         := <tag>[+..]                   'all'tag             := name of taglevel           := trace                   debug                   info                   warning                   erroroutput          := 'stderr'                   'stdout'                   [file=]<filename>decorators      := <decorator>[,...] 'none' ...

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.