nghttpx: Open default log files for errors occurred while parsing options
This commit is contained in:
parent
eebd1f5492
commit
2fb675f13c
|
@ -1620,6 +1620,10 @@ int main(int argc, char **argv)
|
||||||
cmdcfgs.emplace_back(SHRPX_OPT_CERTIFICATE_FILE, argv[optind++]);
|
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();
|
||||||
|
|
||||||
for(size_t i = 0, len = cmdcfgs.size(); i < len; ++i) {
|
for(size_t i = 0, len = cmdcfgs.size(); i < len; ++i) {
|
||||||
if(parse_config(cmdcfgs[i].first, cmdcfgs[i].second) == -1) {
|
if(parse_config(cmdcfgs[i].first, cmdcfgs[i].second) == -1) {
|
||||||
LOG(FATAL) << "Failed to parse command-line argument.";
|
LOG(FATAL) << "Failed to parse command-line argument.";
|
||||||
|
|
Loading…
Reference in New Issue