]> granicus.if.org Git - apache/commitdiff
Adapt loglevel of config errors during second pass
authorStefan Fritsch <sf@apache.org>
Wed, 28 Dec 2011 14:48:28 +0000 (14:48 +0000)
committerStefan Fritsch <sf@apache.org>
Wed, 28 Dec 2011 14:48:28 +0000 (14:48 +0000)
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

server/main.c

index 204d66c794036fbd44b7c0d28d2efc2b266c543e..9b88943f4d6a1fdf7128f4ef1716d4d974684681 100644 (file)
@@ -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);
         }