Created
September 29, 2016 07:16
-
-
Save LogIN-/af373006ae8d33c80a7739c5af143476 to your computer and use it in GitHub Desktop.
Clean Magento Logs Programmatically
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| function cleanMagentoLogs(){ | |
| // Number Of days to keep Logs | |
| $days = 15; | |
| \Mage::app()->getStore()->setConfig(\Mage_Log_Model_Log::XML_LOG_CLEAN_DAYS, $days); | |
| \Mage::getModel('log/log')->clean(); | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment