From 845b58d15f43bb38fc86c4602414fa89a690b7f7 Mon Sep 17 00:00:00 2001 From: Jorge Rodriguez Date: Fri, 29 Nov 2013 10:19:16 +0200 Subject: [PATCH] CustomLog directive takes two parameters. Introduced LogFormat variable and defaulted to "common" format. --- apache/vhosts/standard.tmpl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apache/vhosts/standard.tmpl b/apache/vhosts/standard.tmpl index 3d3f50b..f1540d5 100644 --- a/apache/vhosts/standard.tmpl +++ b/apache/vhosts/standard.tmpl @@ -14,6 +14,7 @@ 'LogLevel': site.get('LogLevel', 'warn'), 'ErrorLog': site.get('ErrorLog', '{0}/{1}-error.log'.format(map.logdir, sitename)), + 'LogFormat': site.get('LogFormat', '"%h %l %u %t \\\"%r\\\" %>s %O"'), 'CustomLog': site.get('CustomLog', '{0}/{1}-access.log'.format(map.logdir, sitename)), 'DocumentRoot': site.get('DocumentRoot', '{0}/{1}'.format(map.wwwdir, sitename)), @@ -39,7 +40,7 @@ {% if site.get('LogLevel') != False %}LogLevel {{ vals.LogLevel }}{% endif %} {% if site.get('ErrorLog') != False %}ErrorLog {{ vals.ErrorLog }}{% endif %} - {% if site.get('CustomLog') != False %}CustomLog {{ vals.CustomLog }}{% endif %} + {% if site.get('CustomLog') != False %}CustomLog {{ vals.CustomLog }} {{ vals.LogFormat }}{% endif %} {% if site.get('DocumentRoot') != False %}DocumentRoot {{ vals.DocumentRoot }}{% endif %} {% if site.get('VirtualDocumentRoot') %}VirtualDocumentRoot {{ vals.VirtualDocumentRoot }}{% endif %}