From 512cd3900b742e01a4a205d2c504741aab5fe84d Mon Sep 17 00:00:00 2001 From: elijah Date: Mon, 9 Feb 2015 22:29:58 -0800 Subject: logs deploy information to /var/log/leap/deploy.log (full puppet log) and /var/log/leap/deploy-summary.log (just the start and complete, with platform version, user, leap_cli version, platform branch). downgrading platform require --downgrade (requires new leap_cli) --- puppet/modules/site_config/manifests/syslog.pp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'puppet/modules/site_config/manifests/syslog.pp') diff --git a/puppet/modules/site_config/manifests/syslog.pp b/puppet/modules/site_config/manifests/syslog.pp index 26c65f02..1b0c1e05 100644 --- a/puppet/modules/site_config/manifests/syslog.pp +++ b/puppet/modules/site_config/manifests/syslog.pp @@ -11,4 +11,13 @@ class site_config::syslog { content => '$ModLoad mmanon action(type="mmanon" ipv4.bits="32" mode="rewrite")' } + + augeas { + 'logrotate_leap_deploy': + context => '/files/etc/logrotate.d/leap_deploy/rule', + changes => [ 'set file /var/log/leap/deploy*.log', 'set rotate 7', + 'set schedule daily', 'set compress compress', + 'set missingok missingok', + 'set copytruncate copytruncate' ] + } } -- cgit v1.2.3 From c79e0282d5b5db3aba0167f13648ccc676fcb96b Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 7 Apr 2015 09:49:52 -0700 Subject: rotate deploy logs by size instead of by date. --- puppet/modules/site_config/manifests/syslog.pp | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) (limited to 'puppet/modules/site_config/manifests/syslog.pp') diff --git a/puppet/modules/site_config/manifests/syslog.pp b/puppet/modules/site_config/manifests/syslog.pp index 1b0c1e05..83b49c8e 100644 --- a/puppet/modules/site_config/manifests/syslog.pp +++ b/puppet/modules/site_config/manifests/syslog.pp @@ -15,8 +15,24 @@ action(type="mmanon" ipv4.bits="32" mode="rewrite")' augeas { 'logrotate_leap_deploy': context => '/files/etc/logrotate.d/leap_deploy/rule', - changes => [ 'set file /var/log/leap/deploy*.log', 'set rotate 7', - 'set schedule daily', 'set compress compress', + changes => [ 'set file /var/log/leap/deploy.log', + 'set rotate 5', + 'set size 1M', + 'set compress compress', + 'set missingok missingok', + 'set copytruncate copytruncate' ]; + + # NOTE: + # the puppet_command script requires the option delaycompress + # be set on the summary log file. + + 'logrotate_leap_deploy_summary': + context => '/files/etc/logrotate.d/leap_deploy_summary/rule', + changes => [ 'set file /var/log/leap/deploy-summary.log', + 'set rotate 5', + 'set size 100k', + 'set delaycompress delaycompress', + 'set compress compress', 'set missingok missingok', 'set copytruncate copytruncate' ] } -- cgit v1.2.3