summaryrefslogtreecommitdiffstats
path: root/modules/loggers/mod_log_config.c
diff options
context:
space:
mode:
authorIan Holsman <ianh@apache.org>2003-02-14 05:17:34 +0100
committerIan Holsman <ianh@apache.org>2003-02-14 05:17:34 +0100
commit7f5768e1876c8e0b8b0b319f273727ecfac3803a (patch)
tree5a6599fe12ef8183582883f4769d3e5927b0b674 /modules/loggers/mod_log_config.c
parentpeople often assume that their Aliases will be found by "best match" rather (diff)
downloadapache2-7f5768e1876c8e0b8b0b319f273727ecfac3803a.tar.xz
apache2-7f5768e1876c8e0b8b0b319f273727ecfac3803a.zip
change optional function to return the previous writer, allowing to have mutliple types
of writers in the same server. (previously you could only have one) it needs a mmn bump.. sorry guys ;( git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@98648 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'modules/loggers/mod_log_config.c')
-rw-r--r--modules/loggers/mod_log_config.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c
index 08a3585e1b..27f3e5f9d5 100644
--- a/modules/loggers/mod_log_config.c
+++ b/modules/loggers/mod_log_config.c
@@ -230,8 +230,8 @@ static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
static void *ap_buffered_log_writer_init(apr_pool_t *p, server_rec *s,
const char* name);
-static void ap_log_set_writer_init(ap_log_writer_init *handle);
-static void ap_log_set_writer(ap_log_writer *handle);
+static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle);
+static ap_log_writer* ap_log_set_writer(ap_log_writer *handle);
static ap_log_writer *log_writer = ap_default_log_writer;
static ap_log_writer_init *log_writer_init = ap_default_log_writer_init;
static int buffered_logs = 0; /* default unbuffered */
@@ -1223,14 +1223,20 @@ static void ap_register_log_handler(apr_pool_t *p, char *tag,
apr_hash_set(log_hash, tag, 1, (const void *)log_struct);
}
-static void ap_log_set_writer_init(ap_log_writer_init *handle)
+static ap_log_writer_init* ap_log_set_writer_init(ap_log_writer_init *handle)
{
+ ap_log_writer_init *old = log_writer_init;
log_writer_init = handle;
+ return old;
+
}
-static void ap_log_set_writer(ap_log_writer *handle)
+static ap_log_writer *ap_log_set_writer(ap_log_writer *handle)
{
+ ap_log_writer *old = log_writer;
log_writer = handle;
+
+ return old;
}
static apr_status_t ap_default_log_writer( request_rec *r,