diff options
author | Anthony Towns <aj@erisian.com.au> | 2023-08-22 14:38:38 +1000 |
---|---|---|
committer | Anthony Towns <aj@erisian.com.au> | 2023-12-15 11:03:25 +1000 |
commit | 667ce3e3297645527b07314e1d5a82275fb25845 (patch) | |
tree | 7b0743bb1106fb7b9982ae57aa7bad8b8f59b47a /src/test | |
parent | ab34dc6012351e7b8aab871dd9d2b38ade1cd9bc (diff) |
logging: Drop BCLog::Level::None
Now that Info-level logging is always logged, there is no further
need for the "None" level, so remove it.
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/logging_tests.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/test/logging_tests.cpp b/src/test/logging_tests.cpp index ad3664b2bb..acc52afb45 100644 --- a/src/test/logging_tests.cpp +++ b/src/test/logging_tests.cpp @@ -84,10 +84,9 @@ BOOST_FIXTURE_TEST_CASE(logging_LogPrintf_, LogSetup) { LogInstance().m_log_sourcelocations = true; LogPrintf_("fn1", "src1", 1, BCLog::LogFlags::NET, BCLog::Level::Debug, "foo1: %s\n", "bar1"); - LogPrintf_("fn2", "src2", 2, BCLog::LogFlags::NET, BCLog::Level::None, "foo2: %s\n", "bar2"); + LogPrintf_("fn2", "src2", 2, BCLog::LogFlags::NET, BCLog::Level::Info, "foo2: %s\n", "bar2"); LogPrintf_("fn3", "src3", 3, BCLog::LogFlags::NONE, BCLog::Level::Debug, "foo3: %s\n", "bar3"); - LogPrintf_("fn4", "src4", 4, BCLog::LogFlags::NONE, BCLog::Level::None, "foo4: %s\n", "bar4"); - LogPrintf_("fn5", "src5", 5, BCLog::LogFlags::NONE, BCLog::Level::Info, "foo5: %s\n", "bar5"); + LogPrintf_("fn4", "src4", 4, BCLog::LogFlags::NONE, BCLog::Level::Info, "foo4: %s\n", "bar4"); std::ifstream file{tmp_log_path}; std::vector<std::string> log_lines; for (std::string log; std::getline(file, log);) { @@ -95,10 +94,9 @@ BOOST_FIXTURE_TEST_CASE(logging_LogPrintf_, LogSetup) } std::vector<std::string> expected = { "[src1:1] [fn1] [net] foo1: bar1", - "[src2:2] [fn2] [net] foo2: bar2", + "[src2:2] [fn2] [net:info] foo2: bar2", "[src3:3] [fn3] [debug] foo3: bar3", "[src4:4] [fn4] foo4: bar4", - "[src5:5] [fn5] foo5: bar5", }; BOOST_CHECK_EQUAL_COLLECTIONS(log_lines.begin(), log_lines.end(), expected.begin(), expected.end()); } @@ -124,7 +122,7 @@ BOOST_FIXTURE_TEST_CASE(logging_LogPrintMacros, LogSetup) "[net:info] foo8: bar8", "[net:warning] foo9: bar9", "[net:error] foo10: bar10", - "[validation] foo11: bar11", + "[validation:info] foo11: bar11", }; BOOST_CHECK_EQUAL_COLLECTIONS(log_lines.begin(), log_lines.end(), expected.begin(), expected.end()); } |