aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/core.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/core.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/core.h')
-rw-r--r--src/daemon/core.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/daemon/core.h b/src/daemon/core.h
index 2b7f0d177..23f7a9f63 100644
--- a/src/daemon/core.h
+++ b/src/daemon/core.h
@@ -33,6 +33,9 @@
#include "misc_log_ex.h"
#include "daemon/command_line_args.h"
+#undef MONERO_DEFAULT_LOG_CATEGORY
+#define MONERO_DEFAULT_LOG_CATEGORY "daemon"
+
namespace daemonize
{
@@ -68,12 +71,12 @@ public:
bool run()
{
//initialize core here
- LOG_PRINT_L0("Initializing core...");
+ MGINFO("Initializing core...");
if (!m_core.init(m_vm_HACK))
{
return false;
}
- LOG_PRINT_L0("Core initialized OK");
+ MGINFO("Core initialized OK");
return true;
}
@@ -84,12 +87,12 @@ public:
~t_core()
{
- LOG_PRINT_L0("Deinitializing core...");
+ MGINFO("Deinitializing core...");
try {
m_core.deinit();
m_core.set_cryptonote_protocol(nullptr);
} catch (...) {
- LOG_PRINT_L0("Failed to deinitialize core...");
+ MERROR("Failed to deinitialize core...");
}
}
};