Skip to content

Commit

Permalink
Merge pull request #2418 from bitshares/fix-p2p-log
Browse files Browse the repository at this point in the history
Restore default logger of network module to "p2p"
  • Loading branch information
abitmore authored Apr 24, 2021
2 parents fe6c428 + 9dd8d64 commit 12ee007
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
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

0 comments on commit 12ee007

Please sign in to comment.