Thursday, August 11, 2011

Quick debug tips in magento

Mage::log() function is used to debug in magento. You can add items to magento’s system log and exception log in your code.
Here’s an example of it’s use:
1) Turn on your logging: Admin > Configuration > Developer > Log Settings > Enabled = Yes
2) Example code snippet where you might find this useful:
Mage::log(get_class_methods($this));
3) Watch your var/log/system.log and var/log/exception.log for raw information from this.

No comments:

Post a Comment