Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Restore default logger of network module to "p2p" #2418

Merged
merged 1 commit into from
Apr 24, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 0 additions & 14 deletions libraries/net/node.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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; \
Expand All @@ -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()
Expand Down
14 changes: 14 additions & 0 deletions libraries/net/node_impl.hxx
Original file line number Diff line number Diff line change
Expand Up @@ -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
*/
Expand Down