This is an automated email from the ASF dual-hosted git repository.
sebb pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/whimsy.git
The following commit(s) were added to refs/heads/master by this push:
new 4a7a2142 Use same combined logformat as live system
4a7a2142 is described below
commit 4a7a2142d4a1e2d2187f45afc3a7a54fb1ac809c
Author: Sebb <[email protected]>
AuthorDate: Fri Feb 2 15:42:41 2024 +0000
Use same combined logformat as live system
---
Dockerfile | 1 +
docker-config/logformat.conf | 2 ++
2 files changed, 3 insertions(+)
diff --git a/Dockerfile b/Dockerfile
index 4bb215cc..b46b4500 100644
--- a/Dockerfile
+++ b/Dockerfile
@@ -85,6 +85,7 @@ RUN DEBIAN_FRONTEND='noninteractive' apt-get install -y
libyaml-dev
COPY docker-config/gitconfig-www /var/www/.gitconfig
COPY docker-config/maintenance_banner.lua /etc/apache2
+COPY docker-config/logformat.conf /etc/apache2/conf-enabled/logformat.conf
# disable security check and telemetry
# Must use the same user and group as apache
diff --git a/docker-config/logformat.conf b/docker-config/logformat.conf
new file mode 100644
index 00000000..7d4a21f2
--- /dev/null
+++ b/docker-config/logformat.conf
@@ -0,0 +1,2 @@
+# As for live system
+LogFormat "<%%JSON:apache_access%%> { \"time\": \"%{%Y-%m-%dT%H:%M:%S%z}t\",
\"client_ip\": \"%a\", \"duration\": %D, \"status\": %>s, \"request\":
\"%U%q\", \"uri\": \"%U\", \"remote_user\": \"%u\", \"query_string\": \"%q\",
\"document\": \"%f\", \"bytes\": %B, \"request_method\": \"%m\",
\"https_protocol\": \"%{SSL_PROTOCOL}e\", \"referer\": \"%{Referer}i\",
\"useragent\": \"%{User-agent}i\", \"vhost\": \"%{Host}i\", \"geo_country\":
\"%{GEOIP_COUNTRY_CODE}n\", \"port\": %p, \"protocol [...]