aboutsummaryrefslogtreecommitdiff
path: root/src/wallet/wallet_rpc_server.cpp
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/wallet/wallet_rpc_server.cpp
parente459d8604df600d3094fba269ecbcf22867cf171 (diff)
parent5833d66f6540e7b34e10ddef37c2b67bd501994b (diff)
downloadmonzero-core-ac7df193ca47261c2dfd91b230489e20955013a2.tar.gz
monzero-core-ac7df193ca47261c2dfd91b230489e20955013a2.tar.xz
monzero-core-ac7df193ca47261c2dfd91b230489e20955013a2.zip
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/wallet/wallet_rpc_server.cpp')
-rw-r--r--src/wallet/wallet_rpc_server.cpp14
1 files changed, 9 insertions, 5 deletions
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index d61b11f8a..bf2cba346 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -46,6 +46,9 @@ using namespace epee;
#include "string_tools.h"
#include "crypto/hash.h"
+#undef MONERO_DEFAULT_LOG_CATEGORY
+#define MONERO_DEFAULT_LOG_CATEGORY "wallet.rpc"
+
namespace
{
const command_line::arg_descriptor<std::string, true> arg_rpc_bind_port = {"rpc-bind-port", "Sets bind port for server"};
@@ -1323,7 +1326,8 @@ int main(int argc, char** argv) {
return 1;
}
- epee::log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL, LOG_LEVEL_2);
+ mlog_configure("monero-wallet-rpc.log", true);
+ mlog_set_log_level(2);
std::unique_ptr<tools::wallet2> wal;
try
@@ -1368,12 +1372,12 @@ int main(int argc, char** argv) {
// if we ^C during potentially length load/refresh, there's no server loop yet
if (quit)
{
- LOG_PRINT_L0(tools::wallet_rpc_server::tr("Storing wallet..."));
+ MINFO(tools::wallet_rpc_server::tr("Storing wallet..."));
wal->store();
- LOG_PRINT_GREEN(tools::wallet_rpc_server::tr("Stored ok"), LOG_LEVEL_0);
+ MINFO(tools::wallet_rpc_server::tr("Stored ok"));
return 1;
}
- LOG_PRINT_GREEN(tools::wallet_rpc_server::tr("Loaded ok"), LOG_LEVEL_0);
+ MINFO(tools::wallet_rpc_server::tr("Loaded ok"));
}
catch (const std::exception& e)
{
@@ -1393,7 +1397,7 @@ int main(int argc, char** argv) {
{
LOG_PRINT_L0(tools::wallet_rpc_server::tr("Storing wallet..."));
wal->store();
- LOG_PRINT_GREEN(tools::wallet_rpc_server::tr("Stored ok"), LOG_LEVEL_0);
+ LOG_PRINT_L0(tools::wallet_rpc_server::tr("Stored ok"));
}
catch (const std::exception& e)
{