RFR: 8273471: Add foldmultilines to UL for stdout/err [v4]
Ioi Lam
iklam at openjdk.java.net
Thu Sep 9 23:34:08 UTC 2021
On Thu, 9 Sep 2021 23:11:49 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
> > If you run with the following command-line:
> > ```
> > java -Xlog:exceptions:::foldmultilines=true -Xlog:cds:::foldmultilines=false
> > ```
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> >
> > Does it give a warning, or does it change foldmultilines of stdout to false?
>
> I think it should give a warning and should keep first option (`foldmultilines=true`). It is same behavior with JDK 16.
> In following case, `filecount` for test.log set to `1` - it is first option.
>
> ```
> $ java -Xlog:logging=info -Xlog:os=warning:file=test.log::filecount=1 -Xlog:exceptions=info:file=test.log::filecount=2 --version
> [0.000s][warning][logging] Output options for existing outputs are ignored.
>
> (snip)
>
> [0.010s][info ][logging] Log output configuration:
> [0.010s][info ][logging] #0: stdout all=warning,logging=info uptime,level,tags
> [0.010s][info ][logging] #1: stderr all=off uptime,level,tags
> [0.010s][info ][logging] #2: file=test.log all=off,os=warning,exceptions=info uptime,level,tags filecount=1,filesize=20480K
> ```
>
> We need to improve this message of course as you said, but I want to work for it in another issue because the behavior in this PR is same with log file output.
Sorry, I wasn't clear. I am not asking about file output. I am asking about stdout output.
java -Xlog:exceptions:stdout::foldmultilines=true -Xlog:cds:stdout::foldmultilines=false
I think this should give the same type of warning as you would get when the output is a file. I.e., the second `foldmultilines=false` should be ignored. However, I think your current implementation will accept the second `foldmultilines=false` and cause stdout to be printed without folded multilines.
-------------
PR: https://git.openjdk.java.net/jdk/pull/5407
More information about the hotspot-runtime-dev
mailing list