From 8c10e77ad2fbd213157e464b172e69ed95f275e9 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Sat, 25 Jun 2022 13:56:26 -0500 Subject: [PATCH 1/2] GH-538 Add transaction_trace_success and transaction_trace_failure trace logging to launcher logger config to enable full logging during tests. --- programs/eosio-launcher/main.cpp | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/programs/eosio-launcher/main.cpp b/programs/eosio-launcher/main.cpp index d0a43a8a53..9b865698e0 100644 --- a/programs/eosio-launcher/main.cpp +++ b/programs/eosio-launcher/main.cpp @@ -1196,6 +1196,18 @@ launcher_def::write_logging_config_file(tn_node_def &node) { if( gelf_enabled ) tft.appenders.push_back( "net" ); log_config.loggers.emplace_back( tft ); + fc::logger_config tts( "transaction_trace_success" ); + tts.level = fc::log_level::debug; + tts.appenders.push_back( "stderr" ); + if( gelf_enabled ) tts.appenders.push_back( "net" ); + log_config.loggers.emplace_back( tts ); + + fc::logger_config ttf( "transaction_trace_failure" ); + ttf.level = fc::log_level::debug; + ttf.appenders.push_back( "stderr" ); + if( gelf_enabled ) ttf.appenders.push_back( "net" ); + log_config.loggers.emplace_back( ttf ); + fc::logger_config ta( "trace_api" ); ta.level = fc::log_level::debug; ta.appenders.push_back( "stderr" ); From e974add384fe62671ae42b9dbd3f144a7d202eb3 Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Sat, 25 Jun 2022 13:57:15 -0500 Subject: [PATCH 2/2] GH-538 Use hex trimming logic for logging of hex_data json value. --- libraries/chain/include/eosio/chain/abi_serializer.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libraries/chain/include/eosio/chain/abi_serializer.hpp b/libraries/chain/include/eosio/chain/abi_serializer.hpp index 01551e9ff6..451ac23ec5 100644 --- a/libraries/chain/include/eosio/chain/abi_serializer.hpp +++ b/libraries/chain/include/eosio/chain/abi_serializer.hpp @@ -475,7 +475,7 @@ namespace impl { binary_to_variant_context _ctx(*abi, ctx, type); _ctx.short_path = true; // Just to be safe while avoiding the complexity of threading an override boolean all over the place mvo( "data", abi->_binary_to_variant( type, act.data, _ctx )); - mvo("hex_data", act.data); + set_hex_data(mvo, "hex_data", act.data); } catch(...) { // any failure to serialize data, then leave as not serailzed set_hex_data(mvo, "data", act.data);