Solving logrotate worries with /var/log/autorotate

No longer worry about growing logfiles or rotating everything properly, use autorotate!

  1. mkdir /var/log/autorotate
  2. # /etc/logrotate.d/autorotate
    /var/log/autorotate/*.log {
     daily
     missingok
     rotate 2
     compress
     notifempty
     copytruncate
     create 0666 deploy users
    }
    
  3. whatever_you_want >> /var/log/autorotate/someting_new.log
    It will be rotated automatically

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s