Created
May 12, 2017 14:56
-
-
Save mehdichaouch/0f88d14af9a85dd77ceb12ba46ee0b1f to your computer and use it in GitHub Desktop.
Magento - Log all events on action
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 | |
# change method in mage.php | |
public static function dispatchEvent($name, array $data = array()) | |
{ | |
Mage::log('Event: ' . $name); //not using Mage::log, as | |
//file_put_contents('/tmp/test.log','Dispatching '. $name. "\n",FILE_APPEND); //poor man's log | |
Varien_Profiler::start('DISPATCH EVENT:'.$name); | |
$result = self::app()->dispatchEvent($name, $data); | |
#$result = self::registry('events')->dispatch($name, $data); | |
Varien_Profiler::stop('DISPATCH EVENT:'.$name); | |
return $result; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment