From 9dd8d643d8d55ce5c0dce170dc2c80b0d64e9ff7 Mon Sep 17 00:00:00 2001 From: abitmore Date: Sat, 24 Apr 2021 10:01:10 +0000 Subject: [PATCH] Restore default logger of network module to "p2p" --- libraries/net/node.cpp | 14 -------------- libraries/net/node_impl.hxx | 14 ++++++++++++++ 2 files changed, 14 insertions(+), 14 deletions(-) diff --git a/libraries/net/node.cpp b/libraries/net/node.cpp index 51bffa0880..03fa07b940 100644 --- a/libraries/net/node.cpp +++ b/libraries/net/node.cpp @@ -91,13 +91,6 @@ #include "node_impl.hxx" -//#define ENABLE_DEBUG_ULOGS - -#ifdef DEFAULT_LOGGER -# undef DEFAULT_LOGGER -#endif -#define DEFAULT_LOGGER "p2p" - #define INVOCATION_COUNTER(name) \ static size_t total_ ## name ## _counter = 0; \ static size_t active_ ## name ## _counter = 0; \ @@ -118,13 +111,6 @@ } \ } invocation_logger(&total_ ## name ## _counter, &active_ ## name ## _counter) -//log these messages even at warn level when operating on the test network -#ifdef GRAPHENE_TEST_NETWORK -#define testnetlog wlog -#else -#define testnetlog(...) do {} while (0) -#endif - namespace graphene { namespace net { namespace detail { void blockchain_tied_message_cache::block_accepted() diff --git a/libraries/net/node_impl.hxx b/libraries/net/node_impl.hxx index 303c3b65a1..2b395223c8 100644 --- a/libraries/net/node_impl.hxx +++ b/libraries/net/node_impl.hxx @@ -16,6 +16,20 @@ namespace bmi = boost::multi_index; #define P2P_IN_DEDICATED_THREAD +//#define ENABLE_DEBUG_ULOGS + +#ifdef DEFAULT_LOGGER +# undef DEFAULT_LOGGER +#endif +#define DEFAULT_LOGGER "p2p" + +//log these messages even at warn level when operating on the test network +#ifdef GRAPHENE_TEST_NETWORK +#define testnetlog wlog +#else +#define testnetlog(...) do {} while (0) +#endif + /******* * A class to wrap std::unordered_set for multithreading */