cli: change the default log config for tests to only report storage warnings/errors on stderr #69765
Labels
A-testing
Testing tools and infrastructure
C-bug
Code not up to spec/doc, specs & docs deemed correct. Solution expected to change code/behavior.
T-server-and-security
DB Server & Security
The default log config used in unit tests only has two modes:
log.Scope
, or-v -show-logs
is specified, or the test does not uselog.Scope
, all log events go to stderr.Folk have found the following shortcomings with this situation:
in the simple case, when a test fails all the logging output is merged into a single log file. This makes investigations somewhat difficult because the combined output from all channels is extremely verbose.
The preference would be to ensure that multiple files are used instead. At least the STORAGE channel should be redirected to a different file in this "silent" case.
In that case, we want the mechanism described also in cli: change the default logging configuration for regular server #69781: send the messages to a dedicated file, but copy WARNING+ messages to the main log file shared with the DEV Channel.
(Do this both for STORAGE and HEALTH)
PR: util/log: split test logs by default into multiple files #69958
in the
-show-logs
case, they would prefer that all the STORAGE messages do not get reported on stderr by default, because most tests do not require storage-level investigations and the STORAGE channel is rather noisy.However, the request is not to remove STORAGE entirely from stderr either. The preference is to ensure that only WARNING/ERROR/FATAL messages from STORAGE get reported on stderr, and the rest in files.
Andrei also recommends to do the same for the HEALTH channel.
PR: util/log: use some files when
-show-logs
is specified #70052in some cases, they would prefer to have an option to fine tune the configuration. Currently, the log config is static per build and cannot be changed per test invocation.
We could thus perhaps add an optional flag to override the default log config for unit tests.
PR: util/log: make it possible to customize the log config in unit tests #69954
the stderr configuration when files are enabled include all events at severity ERROR or above. However, several tests terminate servers in unfriendly ways, which generates errors in logs, but these errors are not really interesting.
We want to change the stderr config to only report messages at severity FATAL. If there are errors, the person can go and investigate the generated files.
PR: util/log: don't report ERROR events on stderr by default in test config #69955
The most pressing problem is point (2) above; followed by (1), then (4), and then (3) as a distant third.
The text was updated successfully, but these errors were encountered: