Fixing Magento Logs Not Rotating Issue
If you are facing the issue of Magento logs not rotating, it can lead to bloated log files that can affect the performance of your website. Here’s how you can solve this problem:
- Access your server via SSH or FTP.
- Navigate to the root directory of your Magento installation.
- Locate the
log.php
file in theapp/code/core/Mage/Log/Model
directory. - Open the
log.php
file in a text editor. - Find the following line of code:
- Replace it with the following code:
- Save the file and upload it back to the server.
- Clear the cache in Magento admin panel.
- Check if the logs are now rotating properly.
protected $_logFile = 'system.log';
protected $_logFile = 'system.log'; protected $_logType = 3;
By following these steps, you should be able to resolve the issue of Magento logs not rotating efficiently. This will help in maintaining a clean and optimized log system for your Magento store.