mirror of
https://github.com/monero-project/monero.git
synced 2025-12-13 15:01:10 -05:00
Merge pull request #2456
91def9a5 daemon, wallet: add --max-log-file-size option (selsta)
This commit is contained in:
commit
32bbe62120
5 changed files with 14 additions and 5 deletions
|
|
@ -46,6 +46,11 @@ namespace daemon_args
|
|||
, "Specify log file"
|
||||
, ""
|
||||
};
|
||||
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<std::string> arg_log_level = {
|
||||
"log-level"
|
||||
, ""
|
||||
|
|
|
|||
|
|
@ -88,6 +88,7 @@ int main(int argc, char const * argv[])
|
|||
bf::path default_log = default_data_dir / std::string(CRYPTONOTE_NAME ".log");
|
||||
command_line::add_arg(core_settings, daemon_args::arg_log_file, default_log.string());
|
||||
command_line::add_arg(core_settings, daemon_args::arg_log_level);
|
||||
command_line::add_arg(core_settings, daemon_args::arg_max_log_file_size);
|
||||
command_line::add_arg(core_settings, daemon_args::arg_max_concurrency);
|
||||
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_bind_ip);
|
||||
command_line::add_arg(core_settings, daemon_args::arg_zmq_rpc_bind_port);
|
||||
|
|
@ -207,7 +208,7 @@ int main(int argc, char const * argv[])
|
|||
if (! vm["log-file"].defaulted())
|
||||
log_file_path = command_line::get_arg(vm, daemon_args::arg_log_file);
|
||||
log_file_path = bf::absolute(log_file_path, relative_path_base);
|
||||
mlog_configure(log_file_path.string(), true);
|
||||
mlog_configure(log_file_path.string(), true, command_line::get_arg(vm, daemon_args::arg_max_log_file_size));
|
||||
|
||||
// Set log level
|
||||
if (!vm["log-level"].defaulted())
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue