From 71545ee7b859a51e14069953ecd1c06ede49afb8 Mon Sep 17 00:00:00 2001 From: Hongbin Lu Date: Sat, 18 Mar 2017 12:03:29 -0500 Subject: [PATCH] Customize the format of zun logs in apache2 Change-Id: Ib18f7187089822edaefcde1d0e56f5251c6586f2 --- etc/apache2/zun.conf.template | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/etc/apache2/zun.conf.template b/etc/apache2/zun.conf.template index 9c8c5973e..c56b7bd54 100644 --- a/etc/apache2/zun.conf.template +++ b/etc/apache2/zun.conf.template @@ -21,15 +21,16 @@ # be adjusted according to local requirements. Listen %PUBLICPORT% +LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)" zun_combined WSGIDaemonProcess zun-api user=%USER% processes=5 threads=1 display-name=%{GROUP} WSGIScriptAlias / %PUBLICWSGI% WSGIProcessGroup zun-api - + ErrorLogFormat "%M" ErrorLog /var/log/%APACHE_NAME%/zun_api.log LogLevel info - CustomLog /var/log/%APACHE_NAME%/zun_access.log combined + CustomLog /var/log/%APACHE_NAME%/zun_access.log zun_combined WSGIProcessGroup zun-api