From: Stefan Fritsch Date: Wed, 28 Dec 2011 14:48:28 +0000 (+0000) Subject: Adapt loglevel of config errors during second pass X-Git-Tag: 2.5.0-alpha~7624 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2ea507b5a3100650f1dbee74811e8127888fa689;p=apache Adapt loglevel of config errors during second pass Don't use APLOG_STARTUP since at that point, the error log is already available. This gives us timestamps if these errors happen during graceful restart. Use level 'emerg' as these errors are fatal. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@1225197 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/server/main.c b/server/main.c index 204d66c794..9b88943f4d 100644 --- a/server/main.c +++ b/server/main.c @@ -731,8 +731,8 @@ int main(int argc, const char * const argv[]) apr_hook_sort_all(); if (ap_run_pre_config(pconf, plog, ptemp) != OK) { - ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, - 0, NULL, APLOGNO(00017) "Pre-configuration failed"); + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL, + APLOGNO(00017) "Pre-configuration failed, exiting"); destroy_and_exit_process(process, 1); } @@ -750,21 +750,21 @@ int main(int argc, const char * const argv[]) apr_hook_sort_all(); if (ap_run_check_config(pconf, plog, ptemp, ap_server_conf) != OK) { - ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, 0, - NULL, APLOGNO(00018) "Configuration check failed"); + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL, + APLOGNO(00018) "Configuration check failed, exiting"); destroy_and_exit_process(process, 1); } apr_pool_clear(plog); if (ap_run_open_logs(pconf, plog, ptemp, ap_server_conf) != OK) { - ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, - 0, NULL, APLOGNO(00019) "Unable to open logs"); + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL, + APLOGNO(00019) "Unable to open logs, exiting"); destroy_and_exit_process(process, 1); } if (ap_run_post_config(pconf, plog, ptemp, ap_server_conf) != OK) { - ap_log_error(APLOG_MARK, APLOG_STARTUP |APLOG_ERR, - 0, NULL, APLOGNO(00020) "Configuration Failed"); + ap_log_error(APLOG_MARK, APLOG_EMERG, 0, NULL, + APLOGNO(00020) "Configuration Failed, exiting"); destroy_and_exit_process(process, 1); }