0

This is my logrotate script:

/var/log/pyApi.log /var/log/runGet*.log {
    daily
    missingok
    rotate 7
    compress
    notifempty
    nocreate
    su
}

Already checked /var/lib/logrotate/status, it says the last run is on 27 February 2016, but the last updated log in var/log is on 23 February 2016. Why is that?

The log is generated from an Upstart script.

Aminah Nuraini
  • 1,029
  • 1
  • 8
  • 15
  • 'ls -l ' from your /var/log will be useful . Have you reloaded logrotate service after changes to conf ? – kranteg Feb 29 '16 at 19:31
  • Sure! Please see here: http://pastebin.com/xnyR8fgT Yup, I have reloaded it. – Aminah Nuraini Mar 02 '16 at 12:18
  • Thinking it is not rotating because there is no file named pyApi.log or runGet*.log . You shoulf check the path of your logging files in your app. – kranteg Mar 04 '16 at 14:12
  • @kranteg, the log doesn't exist because the previously existing log is zipped by the logrotate. What should I do to make sure logrotate keeps working even after the original file gets zipped. – Aminah Nuraini Mar 04 '16 at 16:42

0 Answers0