mirror of
https://codeberg.org/anoncontributorxmr/monero.git
synced 2024-11-30 06:43:28 +01:00
Merge pull request #1643
69d2ad39
wallet_rpc_server: fix logs going to the wrong file (moneromooo-monero)
This commit is contained in:
commit
614400e5af
@ -72,7 +72,8 @@ namespace wallet_args
|
|||||||
int argc, char** argv,
|
int argc, char** argv,
|
||||||
const char* const usage,
|
const char* const usage,
|
||||||
boost::program_options::options_description desc_params,
|
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;
|
namespace bf = boost::filesystem;
|
||||||
@ -138,7 +139,7 @@ namespace wallet_args
|
|||||||
log_path = command_line::get_arg(vm, arg_log_file);
|
log_path = command_line::get_arg(vm, arg_log_file);
|
||||||
else
|
else
|
||||||
log_path = mlog_get_default_log_path("monero-wallet-cli.log");
|
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())
|
if (!vm["log-level"].defaulted())
|
||||||
{
|
{
|
||||||
mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str());
|
mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str());
|
||||||
|
@ -49,5 +49,6 @@ namespace wallet_args
|
|||||||
int argc, char** argv,
|
int argc, char** argv,
|
||||||
const char* const usage,
|
const char* const usage,
|
||||||
boost::program_options::options_description desc_params,
|
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);
|
||||||
}
|
}
|
||||||
|
@ -1324,16 +1324,14 @@ int main(int argc, char** argv) {
|
|||||||
argc, argv,
|
argc, argv,
|
||||||
"monero-wallet-rpc [--wallet-file=<file>|--generate-from-json=<file>] [--rpc-bind-port=<port>]",
|
"monero-wallet-rpc [--wallet-file=<file>|--generate-from-json=<file>] [--rpc-bind-port=<port>]",
|
||||||
desc_params,
|
desc_params,
|
||||||
po::positional_options_description()
|
po::positional_options_description(),
|
||||||
|
true
|
||||||
);
|
);
|
||||||
if (!vm)
|
if (!vm)
|
||||||
{
|
{
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
mlog_configure("monero-wallet-rpc.log", true);
|
|
||||||
mlog_set_log_level(2);
|
|
||||||
|
|
||||||
std::unique_ptr<tools::wallet2> wal;
|
std::unique_ptr<tools::wallet2> wal;
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user