FC Updates from BitShares and myself #21
1 changed files with 13 additions and 0 deletions
|
|
@ -5,6 +5,7 @@
|
||||||
#include <fc/io/raw.hpp>
|
#include <fc/io/raw.hpp>
|
||||||
#include <fc/reflect/variant.hpp>
|
#include <fc/reflect/variant.hpp>
|
||||||
#include <fc/static_variant.hpp>
|
#include <fc/static_variant.hpp>
|
||||||
|
#include <fc/log/logger_config.hpp>
|
||||||
|
|
||||||
namespace fc { namespace test {
|
namespace fc { namespace test {
|
||||||
|
|
||||||
|
|
@ -48,6 +49,15 @@ BOOST_AUTO_TEST_SUITE(fc_variant_and_log)
|
||||||
BOOST_AUTO_TEST_CASE( nested_objects_test )
|
BOOST_AUTO_TEST_CASE( nested_objects_test )
|
||||||
{ try {
|
{ 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 )
|
auto create_nested_object = []( uint32_t level )
|
||||||
{
|
{
|
||||||
ilog( "Creating nested object with ${lv} level(s)", ("lv",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) ) }
|
} FC_CAPTURE_LOG_AND_RETHROW ( (0) ) }
|
||||||
|
|
||||||
BOOST_AUTO_TEST_SUITE_END()
|
BOOST_AUTO_TEST_SUITE_END()
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue