add option to logrotate for conversional policy.
This commit is contained in:
parent
030d994180
commit
1592aaff89
|
@ -93,6 +93,7 @@ def create_rulingcom_logrotate
|
|||
File.open("#{@project_loc}/tmp/logrotate_setting", 'w') { |file| file.write(logrotate_setting.result) }
|
||||
|
||||
`sudo cp #{@project_loc}/tmp/logrotate_setting /etc/logrotate.d/rulingcom`
|
||||
`logrotate -v -f /etc/logrotate.conf`
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
@ -1,24 +1,32 @@
|
|||
/var/log/rulingcom/*.log {
|
||||
daily
|
||||
rotate 5
|
||||
dateext
|
||||
compress
|
||||
rotate 30
|
||||
}
|
||||
|
||||
#Resque
|
||||
<%= "#{@project_folder}/nginx/logs/access.log" %>{
|
||||
daily
|
||||
rotate 5
|
||||
daily
|
||||
dateext
|
||||
compress
|
||||
rotate 30
|
||||
}
|
||||
|
||||
#DB log
|
||||
/var/log/mongodb{
|
||||
daily
|
||||
rotate 5
|
||||
dateext
|
||||
compress
|
||||
rotate 30
|
||||
}
|
||||
|
||||
#Orbit
|
||||
<%= "#{@project_folder}/log/*production.log" %>{
|
||||
daily
|
||||
rotate 5
|
||||
daily
|
||||
dateext
|
||||
compress
|
||||
rotate 30
|
||||
}
|
||||
# end of Orbit,EXTEND IF NEEDED
|
||||
|
||||
|
|
Loading…
Reference in New Issue