From 66e36fc3e1c4b3482876f445372e4bc9a62c8f1f Mon Sep 17 00:00:00 2001 From: guido Date: Tue, 5 Aug 2014 11:19:46 -0400 Subject: Fixes: #5952 Webapp now logs to it's own file instead of syslog and user.log --- puppet/modules/site_webapp/manifests/init.pp | 1 + puppet/modules/site_webapp/manifests/logging.pp | 16 ++++++++++++++++ 2 files changed, 17 insertions(+) create mode 100644 puppet/modules/site_webapp/manifests/logging.pp diff --git a/puppet/modules/site_webapp/manifests/init.pp b/puppet/modules/site_webapp/manifests/init.pp index d6f1d7ae..7fdd0c3f 100644 --- a/puppet/modules/site_webapp/manifests/init.pp +++ b/puppet/modules/site_webapp/manifests/init.pp @@ -16,6 +16,7 @@ class site_webapp { include site_config::ruby::dev include site_webapp::apache include site_webapp::couchdb + include site_webapp::logging include site_haproxy include site_webapp::cron include site_config::x509::cert diff --git a/puppet/modules/site_webapp/manifests/logging.pp b/puppet/modules/site_webapp/manifests/logging.pp new file mode 100644 index 00000000..441c5792 --- /dev/null +++ b/puppet/modules/site_webapp/manifests/logging.pp @@ -0,0 +1,16 @@ +class site_webapp::logging { + + rsyslog::snippet { '01-webapp': + content => 'if $programname == "webapp" then /var/log/leap/webapp.log +stop' + } + + augeas { + 'logrotate_webapp': + context => '/files/etc/logrotate.d/webapp/rule', + changes => [ 'set file /var/log/leap/webapp.log', 'set rotate 7', + 'set schedule daily', 'set compress compress', + 'set missingok missingok', 'set ifempty notifempty', + 'set copytruncate copytruncate' ] + } +} -- cgit v1.2.3