Merge "Rotate zuul logs with logrotate"

This commit is contained in:
James E. Blair 2014-05-27 21:46:30 +00:00 committed by Gerrit Code Review
commit 89e47e0fb1
2 changed files with 64 additions and 0 deletions

View File

@ -33,4 +33,30 @@ class zuul::merger (
require => [User['zuul'],
File['/var/lib/zuul/git']],
}
include logrotate
logrotate::file { 'merger.log':
log => '/var/log/zuul/merger.log',
options => [
'compress',
'copytruncate',
'missingok',
'rotate 30',
'daily',
'notifempty',
],
require => Service['zuul-merger'],
}
logrotate::file { 'merger-debug.log':
log => '/var/log/zuul/merger-debug.log',
options => [
'compress',
'copytruncate',
'missingok',
'rotate 30',
'daily',
'notifempty',
],
require => Service['zuul-merger'],
}
}

View File

@ -29,4 +29,42 @@ class zuul::server (
require => File['/etc/init.d/zuul'],
refreshonly => true,
}
include logrotate
logrotate::file { 'zuul.log':
log => '/var/log/zuul/zuul.log',
options => [
'compress',
'copytruncate',
'missingok',
'rotate 30',
'daily',
'notifempty',
],
require => Service['zuul'],
}
logrotate::file { 'zuul-debug.log':
log => '/var/log/zuul/debug.log',
options => [
'compress',
'copytruncate',
'missingok',
'rotate 30',
'daily',
'notifempty',
],
require => Service['zuul'],
}
logrotate::file { 'gearman-server.log':
log => '/var/log/zuul/gearman-server.log',
options => [
'compress',
'copytruncate',
'missingok',
'rotate 7',
'daily',
'notifempty',
],
require => Service['zuul'],
}
}