From 0028cd35ab5340fe42b9fe019bf6328cc9cae65b Mon Sep 17 00:00:00 2001 From: Zachary Michaels Date: Mon, 16 Jun 2014 10:24:36 -0400 Subject: [PATCH] Add default log directory --- src/daemon/daemon.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/daemon/daemon.cpp b/src/daemon/daemon.cpp index a4760fe3f..cf50464d9 100644 --- a/src/daemon/daemon.cpp +++ b/src/daemon/daemon.cpp @@ -56,14 +56,17 @@ int main(int argc, char* argv[]) po::options_description desc_cmd_only("Command line options"); po::options_description desc_cmd_sett("Command line options and settings options"); + std::string default_data_dir = tools::get_default_data_dir(); + std::string default_log_file = default_data_dir + "/bitmonero.log"; + command_line::add_arg(desc_cmd_only, command_line::arg_help); command_line::add_arg(desc_cmd_only, command_line::arg_version); command_line::add_arg(desc_cmd_only, arg_os_version); // tools::get_default_data_dir() can't be called during static initialization - command_line::add_arg(desc_cmd_only, command_line::arg_data_dir, tools::get_default_data_dir()); + command_line::add_arg(desc_cmd_only, command_line::arg_data_dir, default_data_dir); command_line::add_arg(desc_cmd_only, arg_config_file); - command_line::add_arg(desc_cmd_sett, arg_log_file); + command_line::add_arg(desc_cmd_sett, arg_log_file, default_log_file); command_line::add_arg(desc_cmd_sett, arg_log_level); command_line::add_arg(desc_cmd_sett, arg_console);