1/var/log/waagent.log { 2 # Old versions of log files are compressed with gzip by default. 3 compress 4 5 # Rotate log files > 20 MB, and keep last 50 archived files. With an compression ratio ranging from 5-10%, The 6 # archived files would take an average of around 50-100 MB. Even for extremely chatty agent, the average size of 7 # the compressed files would not go beyond ~2 MB per day. 8 size 20M 9 rotate 50 10 11 # Add date as extension when rotating logs 12 dateext 13 14 # Formatting the date extension to YYYY-MM-DD-SSSSSSS format. logrotate does not provide hours, mins and seconds 15 # option. Adding the %s (system clock epoch time) to differentiate rotated log files within the same day. 16 dateformat -%Y-%m-%d-%s 17 18 # Do not rotate the log if it is empty 19 notifempty 20 21 # If the log file is missing, go on to the next one without issuing an error message. 22 missingok 23}