Open lunarpapillo opened 5 years ago
This seems like a preference thing, to me. But I'll let @dustin-lunarg weigh in.
This still happens on Linux even though stderr is the default, and is set in settings at the point void Log::LogMessage()
is entered. There is a bunch if platform #ifdef
ing in that function which may be hiding a bug.
Since toascii has a --stdout
output option, this is definitely a bug and not a matter of taste for that tool. Logging to stdout when also outputting JSON Lines to stdout makes the mainstream JSON tool jq
choke on our output and kill the pipeline that it is in.
@bradgrantham-lunarg Can we raise the priority on this?
Can we solve the jq
problem temporarily with grep -v '[gfxrecon]'
between the toascii output and jq?
Can we solve the
jq
problem temporarily withgrep -v '[gfxrecon]'
between the toascii output and jq?
Yes for sure. Good point.
Proper function while pipelined is more important than stdout/stderr
. Sending all logging to stderr
(and documenting such) is acceptable (though this will require minor changes in CI, which currently look for important information - e.g. FPS, for performance tests - in stdout
.)
If we're thinking fancy, new switches --log-stdout
, --log-stderr
, --log-stdout-stderr
(INFO
and less go to stdout
, WARN
and higher to stderr
), and --log-none
could be added to allow the user to direct log output as needed. (Right now, if you specify --log-file
, does logging go to just the file, or to the file and stdout
?)
But there may be confusion here, if a user using gfxrecon-convert
in a pipeline doesn't realize that they probably want --log-stderr
or --log-none
... and we probably don't want different tools to have different defaults. So maybe just logging to stderr
is better.
I'll leave it for the team to decide.
But there may be confusion here, if a user using
gfxrecon-convert
in a pipeline doesn't realize that they probably want--log-stderr
or--log-none
... and we probably don't want different tools to have different defaults. So maybe just logging tostderr
is better.
:+1:
The
WARNING
line was issued to stdout. I'd expect it to go to stderr.