diff options
author | 2018-08-01 11:23:03 -0700 | |
---|---|---|
committer | 2018-08-01 11:25:24 -0700 | |
commit | a0ca5acbbd6c86d91b5891215591a51fd6b0d83a (patch) | |
tree | 377dd4222606b32019dc34ca44742f540a52bcbb /src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoLibraryRule.java | |
parent | 6243023bd7b0a86c473fda683f9071e92ed1128c (diff) |
Make sure that user-level log messages are not lost in a buffer if debug
logging is turned off.
WARNINGs, ERRORs, and simple USER messages get printed to stderr when debug logging is disabled, which it is by default. However, before this change, these were lost if they were sent to BAZEL_LOG before Bazel knew whether or not debug logging was requested. This fixes that by maintaining separate buffers, and dumping only the appropriate one to stderr once we know whether or not it is wanted.
Maintaining the separate buffer also allows for it to be easy to, in the future, allow logging to multiple places, if we are logging details to a file and user-level details to stderr, for example.
RELNOTES: None.
PiperOrigin-RevId: 206960686
Diffstat (limited to 'src/main/java/com/google/devtools/build/lib/rules/cpp/proto/CcProtoLibraryRule.java')
0 files changed, 0 insertions, 0 deletions