Bug 65475 - Inconsistent use of both stderr and stdout for debug output
Summary: Inconsistent use of both stderr and stdout for debug output
Status: RESOLVED WONTFIX
Alias: None
Product: Mesa
Classification: Unclassified
Component: Other (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: mesa-dev
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-06 18:59 UTC by Alexander Monakov
Modified: 2018-03-08 03:08 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments

Description Alexander Monakov 2013-06-06 18:59:24 UTC
It would be nice if all textual debug output enabled with environment variables such as LIBGL_VERBOSE, MESA_DEBUG, INTEL_DEBUG and so on would be printed strictly to stderr.  Right now some code in mesa/src uses stderr, but even more code uses stdout.

Dear maintainers, please speak up if open-coding the debug output channel everywhere (with "fprintf(stderr, ...)") would not be acceptable, and please recommend a preferred approach (something like introducing a new mesa_dump function or macro to be used everywhere? what about gallium?).
Comment 1 Ian Romanick 2013-09-04 21:06:10 UTC
It seems like most of the messages should use one of _mesa_problem, _mesa_error, or _mesa_warning.  We may even want an additional _mesa_info.  The advantage of using these (instead of printf directly) is they also route through ARB_debug_output.

printf and fprintf appear ~1500 times in the code base.  Going through and changing all of them (and reviewing all the patches that result), doesn't seem like a good use of anyone's time. :(
Comment 2 Timothy Arceri 2018-03-08 03:08:28 UTC
Closing as wont fix as per the last line of comment 1.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.