While doing some testing, I added some log_warning(gc) statements to hotspot. I later tried running the test application with -Xlog:gc*.
I was surprised that the output from my log_warning statements appeared twice in the captured transcript for the file. The first of each pair looks like
[<time>][warning][gc] Blah, blah, blah
The second looks like
[<time>][warning][gc ] Blah, blah, blah
I suspect the first is going directly to stderr, and the second is going to stdout due to warning being in the level range active for the requested logging tags.
I'm not entirely sure whether this is really a bug, or is instead intended behavior, with some good rationale. If the latter, I'd like to see the rationale, since it certainly confused me. It might help if I could find some helpful reference documentation.
I was surprised that the output from my log_warning statements appeared twice in the captured transcript for the file. The first of each pair looks like
[<time>][warning][gc] Blah, blah, blah
The second looks like
[<time>][warning][gc ] Blah, blah, blah
I suspect the first is going directly to stderr, and the second is going to stdout due to warning being in the level range active for the requested logging tags.
I'm not entirely sure whether this is really a bug, or is instead intended behavior, with some good rationale. If the latter, I'd like to see the rationale, since it certainly confused me. It might help if I could find some helpful reference documentation.
- relates to
-
JDK-8153723 Change the default logging output for errors and warnings from stderr to stdout
-
- Resolved
-