[prev in list] [next in list] [prev in thread] [next in thread] 

List:       apache-httpd-dev
Subject:    [PATCH 2/3] mod_log_config: Forward log_format_items to the log_writer
From:       Thomas Meyer <thomas () m3y3r ! de>
Date:       2023-03-24 21:54:10
Message-ID: 20230324215410.14751-3-thomas () m3y3r ! de
[Download RAW message or body]

Prepare for JSON writer
---
 modules/loggers/mod_log_config.c | 6 +++++-
 modules/loggers/mod_log_config.h | 1 +
 2 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c
index 6934a8691c..d142c888ad 100644
--- a/modules/loggers/mod_log_config.c
+++ b/modules/loggers/mod_log_config.c
@@ -185,12 +185,14 @@ static apr_status_t ap_default_log_writer(request_rec *r,
                            const char **strs,
                            int *strl,
                            int nelts,
+                           void *items,
                            apr_size_t len);
 static apr_status_t ap_buffered_log_writer(request_rec *r,
                            void *handle,
                            const char **strs,
                            int *strl,
                            int nelts,
+                           void *items,
                            apr_size_t len);
 static void *ap_default_log_writer_init(apr_pool_t *p, server_rec *s,
                                         const char* name);
@@ -1178,7 +1180,7 @@ static int config_log_transaction(request_rec *r, config_log_state *cls,
                 "log writer isn't correctly setup");
         return HTTP_INTERNAL_SERVER_ERROR;
     }
-    rv = log_writer(r, cls->log_writer, strs, strl, format->nelts, len);
+    rv = log_writer(r, cls->log_writer, strs, strl, format->nelts, items, len);
     if (rv != APR_SUCCESS) {
         ap_log_rerror(APLOG_MARK, APLOG_WARNING, rv, r, APLOGNO(00646)
                       "Error writing to %s", cls->fname);
@@ -1611,6 +1613,7 @@ static apr_status_t ap_default_log_writer( request_rec *r,
                            const char **strs,
                            int *strl,
                            int nelts,
+                           void *items,
                            apr_size_t len)
 
 {
@@ -1684,6 +1687,7 @@ static apr_status_t ap_buffered_log_writer(request_rec *r,
                                            const char **strs,
                                            int *strl,
                                            int nelts,
+                                           void *items,
                                            apr_size_t len)
 
 {
diff --git a/modules/loggers/mod_log_config.h b/modules/loggers/mod_log_config.h
index 877a593262..591362635d 100644
--- a/modules/loggers/mod_log_config.h
+++ b/modules/loggers/mod_log_config.h
@@ -49,6 +49,7 @@ typedef apr_status_t ap_log_writer(
                             const char **portions,
                             int *lengths,
                             int nelts,
+                            void *items,
                             apr_size_t len);
 
 typedef struct ap_log_handler {
-- 
2.20.1

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic