Logrotate - all applications
(Difference between revisions)
m (MythTV is not a program name--proper capitalization :)) |
(Add version for 0.26) |
||
| (5 intermediate revisions by one user not shown) | |||
| Line 3: | Line 3: | ||
== Log rotation with --logpath logging == | == Log rotation with --logpath logging == | ||
| − | This configuration will work with MythTV logging using either the [[Logging#File_Logging|--logpath]] or [[Logging#syslog_Logging|--syslog]] argument. | + | This configuration will work with MythTV logging for all MythTV applications using either the [[Logging#File_Logging|--logpath]] or [[Logging#syslog_Logging|--syslog]] argument. If using this configuration, other MythTV logrotate configuration files are unnecessary. |
{{Script info | {{Script info | ||
| Line 9: | Line 9: | ||
|long=Example configuration file for using logrotate to rotate your MythTV log files. | |long=Example configuration file for using logrotate to rotate your MythTV log files. | ||
|category=Log Rotation Configuration Files | |category=Log Rotation Configuration Files | ||
| − | |name=logrotate - all applications}} | + | |name=logrotate - all applications |
| + | |author=Beirdo | ||
| + | |S25=yes}} | ||
{{Code box|/etc/logrotate.d/mythtv| | {{Code box|/etc/logrotate.d/mythtv| | ||
<pre> | <pre> | ||
| Line 21: | Line 23: | ||
sharedscripts | sharedscripts | ||
olddir /var/log/mythtv/old | olddir /var/log/mythtv/old | ||
| − | + | lastaction | |
killall -HUP mythbackend | killall -HUP mythbackend | ||
killall -HUP mythfrontend | killall -HUP mythfrontend | ||
killall -HUP mythlcdserver | killall -HUP mythlcdserver | ||
| − | find /var/log/mythtv/old | + | find /var/log/mythtv/old -type f -mtime +30 -delete |
endscript | endscript | ||
} | } | ||
| Line 31: | Line 33: | ||
}} | }} | ||
| + | |||
| + | {{Script info | ||
| + | |short=logrotate configuration for MythTV applications (for 0.26) | ||
| + | |long=Example configuration file for using logrotate to rotate your MythTV log files (for 0.26) | ||
| + | |category=Log Rotation Configuration Files | ||
| + | |name=logrotate - all applications | ||
| + | |author=Beirdo | ||
| + | |S26=yes}} | ||
| + | {{Code box|/etc/logrotate.d/mythtv| | ||
| + | <pre> | ||
| + | /var/log/mythtv/*.log { | ||
| + | weekly | ||
| + | rotate 8 | ||
| + | missingok | ||
| + | ifempty | ||
| + | nocreate | ||
| + | nocompress | ||
| + | sharedscripts | ||
| + | olddir /var/log/mythtv/old | ||
| + | lastaction | ||
| + | killall -HUP mythlogserver | ||
| + | find /var/log/mythtv/old -type f -mtime +30 -delete | ||
| + | endscript | ||
| + | } | ||
| + | </pre> | ||
| + | }} | ||
| + | |||
| + | |||
| + | |||
| + | [[Category:logrotate_Configuration_Files]] | ||
[[Category:Log_Rotation_Configuration_Files]] | [[Category:Log_Rotation_Configuration_Files]] | ||
Revision as of 20:50, 3 August 2012
For most distros, save the configuration file to /etc/logrotate.d/mythtv
Log rotation with --logpath logging
This configuration will work with MythTV logging for all MythTV applications using either the --logpath or --syslog argument. If using this configuration, other MythTV logrotate configuration files are unnecessary.
| Author | Beirdo |
| Description | Example configuration file for using logrotate to rotate your MythTV log files. |
| Supports | |
/var/log/mythtv/*.log {
weekly
rotate 8
missingok
ifempty
nocreate
nocompress
sharedscripts
olddir /var/log/mythtv/old
lastaction
killall -HUP mythbackend
killall -HUP mythfrontend
killall -HUP mythlcdserver
find /var/log/mythtv/old -type f -mtime +30 -delete
endscript
}
| Author | Beirdo |
| Description | Example configuration file for using logrotate to rotate your MythTV log files (for 0.26) |
| Supports | |