From 017c8fdf246df82385fb0222890be85c461d0275 Mon Sep 17 00:00:00 2001 From: Edward Rudd Date: Sun, 26 Oct 2008 00:11:22 +0000 Subject: implement filter support add in check for Apache 1.3 apr_dbd_transaction_mode_set method add transaction stubs --- (limited to 'utility/util.c') diff --git a/utility/util.c b/utility/util.c index 7ecb902..45b95ba 100644 --- a/utility/util.c +++ b/utility/util.c @@ -124,11 +124,15 @@ int ap_unescape_url(char *url) #endif } -void logging_init(config_t *cfg) +void logging_preinit(config_t *cfg) { - apr_status_t rv; apr_pool_create(&cfg->errorlog_p, cfg->pool); apr_file_open_stderr(&cfg->errorlog_fperr, cfg->pool); +} + +void logging_init(config_t *cfg) +{ + apr_status_t rv; if (cfg->errorlog) { rv = apr_file_open(&cfg->errorlog_fp, cfg->errorlog, APR_FOPEN_CREATE | APR_FOPEN_WRITE | APR_FOPEN_APPEND, @@ -170,7 +174,7 @@ void logging_log(config_t *cfg, loglevel_e level, const char *fmt, ...) if (level == LOGLEVEL_NOISE) { apr_file_writev(cfg->errorlog_fperr,vec,2,&blen); } - if (cfg->loglevel > LOGLEVEL_NONE) { + if (cfg->loglevel > LOGLEVEL_NONE && cfg->errorlog_fp) { apr_file_writev(cfg->errorlog_fp,vec,2,&blen); } -- cgit v0.9.2