From 9248113bed1c5c0c610c7108b447314cf2847fdc Mon Sep 17 00:00:00 2001
From: Jim Jagielski <jim@apache.org>
Date: Tue, 7 Jan 2025 15:07:17 +0000
Subject: [PATCH]   *) mod_log_config: Fix LogFormat directive merging

git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/branches/2.4.x@1922961 13f79535-47bb-0310-9956-ffa450edef68

Conflict:NA
Reference:https://github.com/apache/httpd/commit/9248113bed1c5c0c610c7108b447314cf2847fdc

---
 changes-entries/pr65222.txt      | 2 ++
 modules/loggers/mod_log_config.c | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
 create mode 100644 changes-entries/pr65222.txt

diff --git a/changes-entries/pr65222.txt b/changes-entries/pr65222.txt
new file mode 100644
index 0000000..8efffd6
--- /dev/null
+++ b/changes-entries/pr65222.txt
@@ -0,0 +1,2 @@
+  *) mod_log_config: Fix merging for the "LogFormat" directive.
+     PR: 65222. [Michael Kaufmann <mail michael-kaufmann.ch>]
diff --git a/modules/loggers/mod_log_config.c b/modules/loggers/mod_log_config.c
index aba01f2..8a3c64a 100644
--- a/modules/loggers/mod_log_config.c
+++ b/modules/loggers/mod_log_config.c
@@ -1263,7 +1263,7 @@ static void *merge_config_log_state(apr_pool_t *p, void *basev, void *addv)
         add->default_format_string = base->default_format_string;
         add->default_format = base->default_format;
     }
-    add->formats = apr_table_overlay(p, base->formats, add->formats);
+    add->formats = apr_table_overlay(p, add->formats, base->formats);
 
     return add;
 }
-- 
2.33.0

