Creating Custom log file in magento

By

April 20, 2011MagentoNo comments

Magento has a built in support to write log messages. Sometimes we may Need to include our own log file for debugging our own modules. Because the size of default system.log file is too large and also it is difficult to find a specific entry in such a large file.

we can Create our own custom log file as follows

Step 1: Navigate to Admin System > Configuration > Developer > Log Settings->Enabled. If the logsetting is not enabled change it to enabled.

Step 2: Now we can write our log entries in

– Massive Commissions – Extreme Conversions '> The Art Of Covert Hypnosis – Massive Commissions – Extreme Conversions

our custom modules as follows

Mage::log('My Custom log Message entry',null,'mylog.log');

A new file with the name mylog.log will be created in var/log directory.

Open the file to see your custom log entry.

zp8497586rq
zp8497586rq