Provide finer control over the jpackage console output.

Add an optional value to the `--verbose` option. The description of the option 
has changed from:

--verbose
          Enables verbose output

to

  --verbose [<[-]category(,[-]category)*>]
          Configures verbose output. Where "category" is one of
              "all"
              "console"
              "log"
              "errors"
              "progress"
              "resources"
              "summary"
              "tools"
              "trace"
              "warnings"

          Suppress all console output, enable logging via System.Logger API:
              --verbose log
          Enable all message categories in the console:
              --verbose console
          Enable all message categories, but "trace" and "tools" in the console:
              --verbose console,-trace,-tools
          Enable "trace" and "tools" message categories in the console:
              --verbose trace,tools
          Enable "trace" and "tools" message categories in the console and
          enable logging via System.Logger API:
              --verbose log,trace,tools

          If the option is specified without the value, it is equivalent to
              --verbose console,-trace
          If the option is not specified it is equivalent to
              --verbose errors,warnings


Message categories explained in 
[JDK-8377120](https://bugs.openjdk.org/browse/JDK-8377120) CSR.

- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

-------------

Commit messages:
 - Rework format of the --verbose option value
 - Add summary: add StandardSummaryTest
 - Integrate "log" package
 - Add the "log" package
 - Add summary.
 - OptionValue: expose some API
 - Main: split the "verbose" property of the Main.ErrorReporter record into 
"alwaysPrintStackTrace" and "printCommandOutput" properties; make 
Main.ErrorReporter public; MainTest: add test case for an exception with "null" 
message
 - SetBuilder: add convenience methods

Changes: https://git.openjdk.org/jdk/pull/29515/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29515&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8374839
  Stats: 6226 lines in 118 files changed: 5665 ins; 210 del; 351 mod
  Patch: https://git.openjdk.org/jdk/pull/29515.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29515/head:pull/29515

PR: https://git.openjdk.org/jdk/pull/29515

Reply via email to