aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-01-28 11:37:21 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2017-01-28 11:37:21 +0000
commit69d2ad3967d30cbb49805040eef2b35b0984b6d1 (patch)
tree4fca23cd7f61c2872207ea9f3fa02812ced6c5b2
parentMerge pull request #1618 (diff)
downloadmonero-69d2ad3967d30cbb49805040eef2b35b0984b6d1.tar.xz
wallet_rpc_server: fix logs going to the wrong file
-rw-r--r--src/wallet/wallet_args.cpp5
-rw-r--r--src/wallet/wallet_args.h3
-rw-r--r--src/wallet/wallet_rpc_server.cpp6
3 files changed, 7 insertions, 7 deletions
diff --git a/src/wallet/wallet_args.cpp b/src/wallet/wallet_args.cpp
index b7a4532fd..12799f613 100644
--- a/src/wallet/wallet_args.cpp
+++ b/src/wallet/wallet_args.cpp
@@ -72,7 +72,8 @@ namespace wallet_args
int argc, char** argv,
const char* const usage,
boost::program_options::options_description desc_params,
- const boost::program_options::positional_options_description& positional_options)
+ const boost::program_options::positional_options_description& positional_options,
+ bool log_to_console)
{
namespace bf = boost::filesystem;
@@ -138,7 +139,7 @@ namespace wallet_args
log_path = command_line::get_arg(vm, arg_log_file);
else
log_path = mlog_get_default_log_path("monero-wallet-cli.log");
- mlog_configure(log_path, false);
+ mlog_configure(log_path, log_to_console);
if (!vm["log-level"].defaulted())
{
mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str());
diff --git a/src/wallet/wallet_args.h b/src/wallet/wallet_args.h
index 17446abf3..e0719d203 100644
--- a/src/wallet/wallet_args.h
+++ b/src/wallet/wallet_args.h
@@ -49,5 +49,6 @@ namespace wallet_args
int argc, char** argv,
const char* const usage,
boost::program_options::options_description desc_params,
- const boost::program_options::positional_options_description& positional_options);
+ const boost::program_options::positional_options_description& positional_options,
+ bool log_to_console = false);
}
diff --git a/src/wallet/wallet_rpc_server.cpp b/src/wallet/wallet_rpc_server.cpp
index 33e099ceb..6ecc29b6d 100644
--- a/src/wallet/wallet_rpc_server.cpp
+++ b/src/wallet/wallet_rpc_server.cpp
@@ -1324,16 +1324,14 @@ int main(int argc, char** argv) {
argc, argv,
"monero-wallet-rpc [--wallet-file=<file>|--generate-from-json=<file>] [--rpc-bind-port=<port>]",
desc_params,
- po::positional_options_description()
+ po::positional_options_description(),
+ true
);
if (!vm)
{
return 1;
}
- mlog_configure("monero-wallet-rpc.log", true);
- mlog_set_log_level(2);
-
std::unique_ptr<tools::wallet2> wal;
try
{