This is my logrotate script:

/var/log/pyApi.log /var/log/runGet*.log {
    rotate 7

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.

  • '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: pastebin.com/xnyR8fgT Yup, I have reloaded it. – Aminah Nuraini Mar 2 '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 4 '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 4 '16 at 16:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.