0

We have a lot of sites on Magento and the logs are getting gigantic, so I'm wondering if the best way is to use a cron script to rotate them or logrotate. I want to avoid making file copies as it junks up the folder and makes it hard to navigate, so ideally I would want to have only log lines going back two weeks in one file for each domain. Is this possible or is it better to rotate by file?

user2344668
  • 361
  • 1
  • 2
  • 5

1 Answers1

0

Look at the man pages for logrotate, as well as some of the active uses in the system. It has a lot of flexibility including rotation based on size, number of cycles to keep, etc. It will do what you want.

Check it out.

mdpc
  • 11,856
  • 28
  • 53
  • 67