Is there a way that we can log all those actions used during an event in magento. Let say, while placing orders in onepage checkout, after placing order, there is one event fired at last 'sales_order_place_after', I wanted to trace all those actions being fired at and after this event. I am trying this because I am trying to debug an issue- After an order is placed in my magento site, admin user is getting logged out. My idea is saying that somewhere after order is placed, there must be some action clearing session, so I wanted to trace that action and check if its really clearing any session of there is some other root cause for the issue.

  • there must be some action clearing session are you talking about admin placing orders in the backend? Commented Oct 21, 2015 at 13:38
  • @JulienLachal: No, normal customers are placing orders in frontend but somehow admin is getting logged out after every orders are placed..Perhaps, It has started after a third party upgraded the site from 18 to 1.9..any possible solutions? Commented Oct 21, 2015 at 13:51
  • "It has started after a third party upgraded the site from 1.8 to 1.9" are you talking about someone upgrading your Magento? Or about a specific module? If it's a someone, I suggest you ask them what they have done. Commented Oct 21, 2015 at 13:56
  • What is your session handler in your local.xml ? Also: magento.stackexchange.com/questions/428/…
    – B00MER
    Commented Oct 21, 2015 at 17:11

1 Answer 1


In the mainapp/code/core/Mage/Core/Model/App.php class it shows how the observers of specific events being fired in the dispatchEvent method , the foreach that starts on line ~1300 will loop through all of them after setting the event and the data passed.

    foreach ($events[$eventName]['observers'] as $obsName=>$obs) {
        Varien_Profiler::start('OBSERVER: '.$obsName);
        switch ($obs['type']) {
            case 'disabled':
            case 'object':
            case 'model':
                $method = $obs['method'];
                $object = Mage::getModel($obs['model']);
                $this->_callObserverMethod($object, $method, $observer);
                $method = $obs['method'];
                $object = Mage::getSingleton($obs['model']);
                $this->_callObserverMethod($object, $method, $observer);
        Varien_Profiler::stop('OBSERVER: '.$obsName);

So you will notice that the profiler starts to log those observers which if it is enabled , the output will be shown on the page you are working on.


Also you can log to your own file if you like :


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.