Difference between revisions of "Logrotate - mythpreviewgen"

From MythTV Official Wiki
Jump to: navigation, search
(Create initial page)
 
m (add to logrotate-specific category)
 
(One intermediate revision by the same user not shown)
Line 43: Line 43:
 
<pre>
 
<pre>
 
/var/log/mythtv/mythpreviewgen.log {
 
/var/log/mythtv/mythpreviewgen.log {
    compress
+
        weekly
    compresscmd /usr/bin/bzip2
+
        rotate 8
    uncompresscmd /usr/bin/bunzip2
+
        missingok
    compressext .bz2
+
        ifempty
    delaycompress
+
        nocreate
    missingok
+
        compress
    notifempty
+
        compresscmd /usr/bin/bzip2
    rotate 8
+
        uncompresscmd /usr/bin/bunzip2
    weekly
+
        compressext .bz2
 +
        delaycompress
 
}
 
}
 
</pre>
 
</pre>
 
}}
 
}}
  
 +
[[Category:logrotate_Configuration_Files]]
 
[[Category:Log_Rotation_Configuration_Files]]
 
[[Category:Log_Rotation_Configuration_Files]]

Latest revision as of 23:08, 17 May 2012

For most distros, save the configuration file to /etc/logrotate.d/mythpreviewgen

Log rotation with --logpath logging

This configuration will work with standard MythTV logging using the --logpath argument.


Author unknown
Description Example configuration file for using logrotate to rotate your mythpreviewgen log files when using --logpath.
Supports Version25.png  


Script.png /etc/logrotate.d/mythpreviewgen

/var/log/mythtv/mythpreviewgen*.log {
        weekly
        rotate 8
        missingok
        ifempty
        nocreate
        nocompress
        sharedscripts
        olddir /var/log/mythtv/old
        lastaction
                find /var/log/mythtv/old -name 'mythpreviewgen*' -type f -mtime +30 -delete
        endscript
}   


Log rotation with --syslog logging

This logrotate configuration will only work with specific log file names. If you use the --logpath argument to mythpreviewgen, the log file name will include date and process ID information, meaning it will be different for each run of mythpreviewgen. Therefore, this approach can only be used if you configure mythpreviewgen (meaning you've configured mythbackend) to use syslog logging and configure syslog to use static file names.


Author unknown
Description Example configuration file for using logrotate to rotate your mythpreviewgen log files when using --syslog.
Supports Version25.png  


Script.png /etc/logrotate.d/mythpreviewgen

/var/log/mythtv/mythpreviewgen.log {
        weekly
        rotate 8
        missingok
        ifempty
        nocreate
        compress
        compresscmd /usr/bin/bzip2
        uncompresscmd /usr/bin/bunzip2
        compressext .bz2
        delaycompress
}