RFR: 8273104: Refactoring option parser for UL [v2]

Yasumasa Suenaga ysuenaga at openjdk.java.net
Tue Sep 7 01:43:03 UTC 2021


> As we discussed in PR #4885 and in [its CSR](https://bugs.openjdk.java.net/browse/JDK-8271188), we want to introduce `foldmultilines` to stdout/err UL output. However we have no chance to configure `LogOutput` for stdout/err (`LogStdoutOutput`/`LogStderrOutput`) becasuse they will be instantiated statically in logFileStreamOutput.cpp.
> 
> So we need to refactor UL option parser to propagate options to all extended classes of `LogOutput`.
> 
> * Move `parse_option()` to `LogOutput` from `LogFileOutput`, then it becames public member.
> * Introduce `set_option()` in `LogOutput` as a pure virtual member to apply options to each log output, then it is implemented in both `LogFileStreamOutput` and `LogFileOutput`.
> * Move both `FoldMultilinesOptionKey` and `_fold_mulilines` in `LogFileStreamOutput` to private member because they are no longer to need to be public.
> 
> I want to send PR to introduce `foldmultilines` to stdout/err like https://github.com/YaSuenag/jdk/compare/ul-refactoring...YaSuenag:foldmultilines-for-stdout after this.

Yasumasa Suenaga has updated the pull request incrementally with one additional commit since the last revision:

  Fix condition for error stream

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

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/5293/files
  - new: https://git.openjdk.java.net/jdk/pull/5293/files/e1f098e0..6bc61af5

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=5293&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=5293&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/5293.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/5293/head:pull/5293

PR: https://git.openjdk.java.net/jdk/pull/5293


More information about the hotspot-runtime-dev mailing list