diff --git a/tests/variant_test.cpp b/tests/variant_test.cpp index c35f0e3..4a66ede 100644 --- a/tests/variant_test.cpp +++ b/tests/variant_test.cpp @@ -5,6 +5,7 @@ #include #include #include +#include namespace fc { namespace test { @@ -48,6 +49,15 @@ BOOST_AUTO_TEST_SUITE(fc_variant_and_log) BOOST_AUTO_TEST_CASE( nested_objects_test ) { try { + ilog( "Suppressing logging (but not disabled)" ); + fc::logging_config cfg; + fc::logger_config dlc; + dlc.name = "default"; + dlc.level = fc::log_level::debug; + dlc.appenders.push_back("stderr"); + cfg.loggers.push_back( dlc ); + fc::configure_logging( cfg ); + auto create_nested_object = []( uint32_t level ) { ilog( "Creating nested object with ${lv} level(s)", ("lv",level) ); @@ -166,6 +176,9 @@ BOOST_AUTO_TEST_CASE( nested_objects_test ) } + fc::configure_logging( fc::logging_config::default_config() ); + ilog( "End suppressing logging" ); + } FC_CAPTURE_LOG_AND_RETHROW ( (0) ) } BOOST_AUTO_TEST_SUITE_END()