diff --git a/src/client/main.cpp b/src/client/main.cpp index 1888a82..a2a1c83 100644 --- a/src/client/main.cpp +++ b/src/client/main.cpp @@ -56,7 +56,7 @@ int main(int argc, char *argv[]) client::Config &config = g_client_config; - const char opts[100] = "hs:P:C:U:l:m:"; + const char opts[100] = "hs:P:C:U:l:L:m:"; const char usagefmt[1000] = "Usage: %s [OPTION]...\n" " -h Show this help\n" @@ -64,7 +64,8 @@ int main(int argc, char *argv[]) " -P [share_path] Specify share/ path\n" " -C [cache_path] Specify cache/ path\n" " -U [urho3d_path] Specify Urho3D path\n" - " -l [integer] Set maximum log level (0...5)\n" + " -l [level number] Set maximum log level (0...5)\n" + " -L [log file path] Append log to a specified file\n" " -m [name] Choose menu extension name\n" ; @@ -95,6 +96,9 @@ int main(int argc, char *argv[]) case 'l': log_set_max_level(atoi(c55_optarg)); break; + case 'L': + log_set_file(c55_optarg); + break; case 'm': fprintf(stderr, "INFO: config.menu_extension_name: %s\n", c55_optarg); config.menu_extension_name = c55_optarg; diff --git a/src/server/main.cpp b/src/server/main.cpp index 3a29c6f..a19ccdf 100644 --- a/src/server/main.cpp +++ b/src/server/main.cpp @@ -76,7 +76,7 @@ int main(int argc, char *argv[]) std::string module_path; - const char opts[100] = "hm:r:i:S:U:c:l:C:"; + const char opts[100] = "hm:r:i:S:U:c:l:L:C:"; const char usagefmt[1000] = "Usage: %s [OPTION]...\n" " -h Show this help\n" @@ -87,6 +87,7 @@ int main(int argc, char *argv[]) " -U [urho3d_path] Specify Urho3D path\n" " -c [command] Set compiler command\n" " -l [integer] Set maximum log level (0...5)\n" + " -L [log file path] Append log to a specified file\n" " -C [module_name] Skip compiling specified module\n" ; @@ -125,6 +126,9 @@ int main(int argc, char *argv[]) case 'l': log_set_max_level(atoi(c55_optarg)); break; + case 'L': + log_set_file(c55_optarg); + break; case 'C': fprintf(stderr, "INFO: config.skip_compiling_modules += %s\n", c55_optarg);