diff options
author | selsta <selsta@sent.at> | 2017-09-17 04:42:45 +0200 |
---|---|---|
committer | selsta <selsta@sent.at> | 2017-09-17 04:42:45 +0200 |
commit | 91def9a59b7b6e252dba4a0a4dd559ad81be2b0d (patch) | |
tree | 53176070df785f0b14b1ed845638f7dc84e744ec /src/wallet | |
parent | Merge pull request #2378 (diff) | |
download | monero-91def9a59b7b6e252dba4a0a4dd559ad81be2b0d.tar.xz |
daemon, wallet: add --max-log-file-size option
Diffstat (limited to 'src/wallet')
-rw-r--r-- | src/wallet/wallet_args.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/wallet/wallet_args.cpp b/src/wallet/wallet_args.cpp index 34c5a2a5d..68f56e06f 100644 --- a/src/wallet/wallet_args.cpp +++ b/src/wallet/wallet_args.cpp @@ -84,6 +84,7 @@ namespace wallet_args #endif const command_line::arg_descriptor<std::string> arg_log_level = {"log-level", "0-4 or categories", ""}; + const command_line::arg_descriptor<std::size_t> arg_max_log_file_size = {"max-log-file-size", "Specify maximum log file size [B]", MAX_LOG_FILE_SIZE}; const command_line::arg_descriptor<uint32_t> arg_max_concurrency = {"max-concurrency", wallet_args::tr("Max number of threads to use for a parallel job"), DEFAULT_MAX_CONCURRENCY}; const command_line::arg_descriptor<std::string> arg_log_file = {"log-file", wallet_args::tr("Specify log file"), ""}; const command_line::arg_descriptor<std::string> arg_config_file = {"config-file", wallet_args::tr("Config file"), "", true}; @@ -101,6 +102,7 @@ namespace wallet_args command_line::add_arg(desc_params, arg_log_file, ""); command_line::add_arg(desc_params, arg_log_level); + command_line::add_arg(desc_params, arg_max_log_file_size); command_line::add_arg(desc_params, arg_max_concurrency); command_line::add_arg(desc_params, arg_config_file); @@ -141,7 +143,7 @@ namespace wallet_args log_path = command_line::get_arg(vm, arg_log_file); else log_path = mlog_get_default_log_path(default_log_name); - mlog_configure(log_path, log_to_console); + mlog_configure(log_path, log_to_console, command_line::get_arg(vm, arg_max_log_file_size)); if (!vm["log-level"].defaulted()) { mlog_set_log(command_line::get_arg(vm, arg_log_level).c_str()); |