From: Sarah Hoffmann Date: Mon, 15 Dec 2014 20:59:53 +0000 (+0100) Subject: nominatim: enable file-based query log and log rotation X-Git-Url: https://git.openstreetmap.org./chef.git/commitdiff_plain/4580187facb6dad0c10940fe92b39f6aaa859823?ds=sidebyside nominatim: enable file-based query log and log rotation --- diff --git a/cookbooks/nominatim/templates/default/logrotate.nominatim.erb b/cookbooks/nominatim/templates/default/logrotate.nominatim.erb index a8952fe8f..5e2caae28 100644 --- a/cookbooks/nominatim/templates/default/logrotate.nominatim.erb +++ b/cookbooks/nominatim/templates/default/logrotate.nominatim.erb @@ -9,6 +9,16 @@ notifempty create 640 nominatim adm } + +/var/log/nominatim/query.log { + weekly + missingok + rotate 52 + compress + delaycompress + notifempty + create 640 www-data adm +} <% if node[:lsb][:release].to_f < 14.04 -%> /var/log/php5-fpm.log { diff --git a/cookbooks/nominatim/templates/default/nominatim.erb b/cookbooks/nominatim/templates/default/nominatim.erb index d05c8f558..591f826e5 100644 --- a/cookbooks/nominatim/templates/default/nominatim.erb +++ b/cookbooks/nominatim/templates/default/nominatim.erb @@ -9,3 +9,5 @@ else @define('CONST_Postgresql_Version', '<%= @postgres_version %>'); @define('CONST_Postgis_Version', '<%= node[:nominatim][:database][:postgis] %>'); + +@define('CONST_Log_File', '/var/log/nominatim/query.log');