aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/p2p.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2017-01-15 20:31:16 -0500
committerRiccardo Spagni <ric@spagni.net>2017-01-15 20:31:16 -0500
commitac7df193ca47261c2dfd91b230489e20955013a2 (patch)
treee4d312059948a0528583e7ea58d2c0b40307a494 /src/daemon/p2p.h
parentMerge pull request #1578 (diff)
parentChange logging to easylogging++ (diff)
downloadmonero-ac7df193ca47261c2dfd91b230489e20955013a2.tar.xz
Merge pull request #1522
5833d66f Change logging to easylogging++ (moneromooo-monero) dc98019b easylogging++: fix logging with static const header only data members (moneromooo-monero) 3b46617b easylogging++: add ELPP_DISABLE_CHECK_MACROS (moneromooo-monero) 6fe39d90 easylogging++: allow clipping a common filename prefix (moneromooo-monero) 43abf6ff easylogging++: add file-only logs (moneromooo-monero) c313bea4 eayslogging++: Fix bad memory access before opening any files (moneromooo-monero) 0af5d168 easylogging++: avoid creating directory/filename for the builtin default log file (moneromooo-monero) 28362847 easylogging++: allow setting thread names (moneromooo-monero) ec71ce8d easylogging++: Print thread ID in a nicer way (moneromooo-monero) 2a0bf783 easylogging++: Add logging categories (moneromooo-monero) c50bbbfe easylogging++: import upstream (moneromooo-monero)
Diffstat (limited to 'src/daemon/p2p.h')
-rw-r--r--src/daemon/p2p.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/daemon/p2p.h b/src/daemon/p2p.h
index 3858989ce..f29c2d822 100644
--- a/src/daemon/p2p.h
+++ b/src/daemon/p2p.h
@@ -34,6 +34,9 @@
#include "p2p/net_node.h"
#include "daemon/protocol.h"
+#undef MONERO_DEFAULT_LOG_CATEGORY
+#define MONERO_DEFAULT_LOG_CATEGORY "daemon"
+
namespace daemonize
{
@@ -57,12 +60,12 @@ public:
: m_server{protocol.get()}
{
//initialize objects
- LOG_PRINT_L0("Initializing p2p server...");
+ MGINFO("Initializing p2p server...");
if (!m_server.init(vm))
{
throw std::runtime_error("Failed to initialize p2p server.");
}
- LOG_PRINT_L0("P2p server initialized OK");
+ MGINFO("P2p server initialized OK");
}
t_node_server & get()
@@ -72,9 +75,9 @@ public:
void run()
{
- LOG_PRINT_L0("Starting p2p net loop...");
+ MGINFO("Starting p2p net loop...");
m_server.run();
- LOG_PRINT_L0("p2p net loop stopped");
+ MGINFO("p2p net loop stopped");
}
void stop()
@@ -84,11 +87,11 @@ public:
~t_p2p()
{
- LOG_PRINT_L0("Deinitializing p2p...");
+ MGINFO("Deinitializing p2p...");
try {
m_server.deinit();
} catch (...) {
- LOG_PRINT_L0("Failed to deinitialize p2p...");
+ MERROR("Failed to deinitialize p2p...");
}
}
};