From eabd71097452e6bae67a98bf3c548f0cb7d1cb37 Mon Sep 17 00:00:00 2001
From: Ian Wienand <iwienand@redhat.com>
Date: Fri, 7 Jun 2019 10:21:08 +1000
Subject: [PATCH] Switch mirror Apache logs to ISO8601

Unfortunately it's not uncommon to be correlating mirror access logs
to remote requests to see what is going on with access failures.  It
is *much* easier when everything is in ISO8601 format and not using
strings for month names, etc.

Switch the log format used everywhere to "compact ISO 8601 format,
including micro-seconds".  The errorlog format is based on

 http://httpd.apache.org/docs/2.4/mod/core.html#errorlogformat

Change-Id: I0aafb831d5c5ca3abf031771d5f59c986611e197
---
 playbooks/roles/mirror/templates/mirror.vhost.j2 | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/playbooks/roles/mirror/templates/mirror.vhost.j2 b/playbooks/roles/mirror/templates/mirror.vhost.j2
index 7beab4646b..0653bd57eb 100644
--- a/playbooks/roles/mirror/templates/mirror.vhost.j2
+++ b/playbooks/roles/mirror/templates/mirror.vhost.j2
@@ -11,7 +11,10 @@ NameVirtualHost *:8081
 Listen 8082
 NameVirtualHost *:8082
 
-LogFormat "%h %l %u %t \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-agent}i\"" combined-cache
+{% raw %}
+LogFormat "%h %l %u [%{%F %T}t.%{msec_frac}t] \"%r\" %>s %b %{cache-status}e \"%{Referer}i\" \"%{User-agent}i\"" combined-cache
+ErrorLogFormat "[%{cu}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] %M% , \ referer\ %{Referer}i"
+{% endraw %}
 
 <Macro BaseProxy $port>