From 139837d69d8566088125d29739089aec7b2a9e7c Mon Sep 17 00:00:00 2001 From: Ian Wienand Date: Tue, 8 Aug 2017 17:51:29 +1000 Subject: [PATCH] Make TLS logs more readable After looking at these for I9881f2e7d51fdd9fc0f7fb3e37179aa53171b531 I found them not as useful as they could be. Fix the CustomLog command, that wants the logfile then the format string (or a nickname, which the LogFormat line wasn't setting). Use standard micro-second timestamps, and trim the access log to have more relevant info. Change-Id: I9f4c8ef38ab9e08aeced7b309d4a5276de07af4b --- lib/tls | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/tls b/lib/tls index 6a3d260ebd..7bde5e6496 100644 --- a/lib/tls +++ b/lib/tls @@ -533,10 +533,9 @@ $listen_string ProxyPassReverse http://$b_host:$b_port/ ErrorLog $APACHE_LOG_DIR/tls-proxy_error.log - ErrorLogFormat "[%{u}t] [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] [frontend\ %A] %M% ,\ referer\ %{Referer}i" + ErrorLogFormat "%{cu}t [%-m:%l] [pid %P:tid %T] %7F: %E: [client\ %a] [frontend\ %A] %M% ,\ referer\ %{Referer}i" LogLevel info - CustomLog $APACHE_LOG_DIR/tls-proxy_access.log common - LogFormat "%v %h %l %u %t \"%r\" %>s %b" + CustomLog $APACHE_LOG_DIR/tls-proxy_access.log "%{%Y-%m-%d}t %{%T}t.%{msec_frac}t [%l] %a \"%r\" %>s %b" EOF if is_suse ; then