mirror of
https://git.wownero.com/wownero/wownero.git
synced 2024-08-15 01:03:23 +00:00
Merge pull request #5435
5140c15e
daemon: if a log file has a /, interpret it from the cwd (moneromooo-monero)
This commit is contained in:
commit
b0472c43a1
1 changed files with 6 additions and 1 deletions
|
@ -257,6 +257,11 @@ int main(int argc, char const * argv[])
|
||||||
bf::path log_file_path {data_dir / std::string(CRYPTONOTE_NAME ".log")};
|
bf::path log_file_path {data_dir / std::string(CRYPTONOTE_NAME ".log")};
|
||||||
if (!command_line::is_arg_defaulted(vm, daemon_args::arg_log_file))
|
if (!command_line::is_arg_defaulted(vm, daemon_args::arg_log_file))
|
||||||
log_file_path = command_line::get_arg(vm, daemon_args::arg_log_file);
|
log_file_path = command_line::get_arg(vm, daemon_args::arg_log_file);
|
||||||
|
#ifdef __WIN32
|
||||||
|
if (!strchr(log_file_path.c_str(), '/') && !strchr(log_file_path.c_str(), '\\'))
|
||||||
|
#else
|
||||||
|
if (!strchr(log_file_path.c_str(), '/'))
|
||||||
|
#endif
|
||||||
log_file_path = bf::absolute(log_file_path, relative_path_base);
|
log_file_path = bf::absolute(log_file_path, relative_path_base);
|
||||||
mlog_configure(log_file_path.string(), true, command_line::get_arg(vm, daemon_args::arg_max_log_file_size), command_line::get_arg(vm, daemon_args::arg_max_log_files));
|
mlog_configure(log_file_path.string(), true, command_line::get_arg(vm, daemon_args::arg_max_log_file_size), command_line::get_arg(vm, daemon_args::arg_max_log_files));
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue