Commit 9b63fc01 authored by Tatsuhiro Tsujikawa's avatar Tatsuhiro Tsujikawa

nghttpx: Open log files by default configuration

parent cab6c787
......@@ -1601,6 +1601,10 @@ int main(int argc, char **argv) {
create_config();
fill_default_config();
// First open log files with default configuration, so that we can
// log errors/warnings while reading configuration files.
reopen_log_files();
// We have to copy argv, since getopt_long may change its content.
mod_config()->argc = argc;
mod_config()->argv = new char *[argc];
......@@ -2117,8 +2121,7 @@ int main(int argc, char **argv) {
cmdcfgs.emplace_back(SHRPX_OPT_CERTIFICATE_FILE, argv[optind++]);
}
// First open default log files to deal with errors occurred while
// parsing option values.
// Reopen log files using configurations in file
reopen_log_files();
{
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment