Create BCLog::Level::Trace log severity level

for verbose log messages for development or debugging only, as bitcoind may run
more slowly, that are more granular/frequent than the Debug log level, i.e. for
very high-frequency, low-level messages to be logged distinctly from
higher-level, less-frequent debug logging that could still be usable in production.

An example would be to log higher-level peer events (connection, disconnection,
misbehavior, eviction) as Debug, versus Trace for low-level, high-volume p2p
messages in the BCLog::NET category. This will enable the user to log only the
former without the latter, in order to focus on high-level peer management events.

With respect to the name, "trace" is suggested as the most granular level
in resources like the following:
- https://sematext.com/blog/logging-levels
- https://howtodoinjava.com/log4j2/logging-levels

Update the test framework and add test coverage.
This commit is contained in:
Jon Atack
2022-06-01 13:44:59 +02:00
parent 2a8712db4f
commit 45f9282162
6 changed files with 19 additions and 14 deletions

View File

@@ -119,7 +119,7 @@ class TestNode():
if self.version_is_at_least(219900):
self.args.append("-logsourcelocations")
if self.version_is_at_least(239000):
self.args.append("-loglevel=debug")
self.args.append("-loglevel=trace")
self.cli = TestNodeCLI(bitcoin_cli, self.datadir)
self.use_cli = use_cli