mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 15:09:59 +01:00
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:
@@ -21,7 +21,7 @@ BOOST_FIXTURE_TEST_SUITE(i2p_tests, BasicTestingSetup)
|
||||
BOOST_AUTO_TEST_CASE(unlimited_recv)
|
||||
{
|
||||
const auto prev_log_level{LogInstance().LogLevel()};
|
||||
LogInstance().SetLogLevel(BCLog::Level::Debug);
|
||||
LogInstance().SetLogLevel(BCLog::Level::Trace);
|
||||
auto CreateSockOrig = CreateSock;
|
||||
|
||||
// Mock CreateSock() to create MockSock.
|
||||
|
||||
Reference in New Issue
Block a user