--- modules/loggers/mod_log_config.c (revision 677865) +++ modules/loggers/mod_log_config.c (working copy) @@ -1507,6 +1507,19 @@ return OK; } +static void log_configtest(apr_pool_t *p, server_rec *s) +{ + apr_status_t rc; + /* We check if we can open atleast the error file. + */ + if ((rc = apr_file_open(&s->error_log, s->error_fname, APR_APPEND | APR_WRITE | APR_CREATE | APR_LARGEFILE, + APR_OS_DEFAULT, p)) != APR_SUCCESS) { + ap_log_error(APLOG_MARK, APLOG_STARTUP, rc, NULL, + "could not open error log file %s.",s->error_fname); + } else { + apr_file_close(s->error_log); + } +} static void register_hooks(apr_pool_t *p) { @@ -1514,6 +1527,7 @@ ap_hook_child_init(init_child,NULL,NULL,APR_HOOK_MIDDLE); ap_hook_open_logs(init_config_log,NULL,NULL,APR_HOOK_MIDDLE); ap_hook_log_transaction(multi_log_transaction,NULL,NULL,APR_HOOK_MIDDLE); + ap_hook_test_config(log_configtest,NULL,NULL,APR_HOOK_MIDDLE); /* Init log_hash before we register the optional function. It is * possible for the optional function, ap_register_log_handler,