How to create custom log files for Magento 1

The standard way for logging is to use

Mage::log(“This will show up in var/log/system.log”);

However, you may want to split these up so specific information goes to the same place. To do this, you simply need to do:

Mage::log(“This will show up in var/log/custom.log”, null, custom.log);

If you need to add a variable you are trying to log, you would use:

Mage::log(“The variable is: ” . $variable, null, custom.log);

Leave a Reply

Your email address will not be published. Required fields are marked *