From 4580187facb6dad0c10940fe92b39f6aaa859823 Mon Sep 17 00:00:00 2001 From: Sarah Hoffmann Date: Mon, 15 Dec 2014 21:59:53 +0100 Subject: [PATCH] nominatim: enable file-based query log and log rotation --- .../templates/default/logrotate.nominatim.erb | 10 ++++++++++ cookbooks/nominatim/templates/default/nominatim.erb | 2 ++ 2 files changed, 12 insertions(+) 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'); -- 2.43.2