In the Enterprise_Logging_Model_Processor :: logAction() function, there is the following code below. Is there a way to change the handler (pass it in the original event triggered maybe?) which will be called below?
I have a custom observer in my own module in which I want to create a custom event log record but the observer method below is called first (at which point the log event is already created, so if I create one in my observer method, there are two)
$ loggingEvent->setAction($ this->_eventConfig->action); $ loggingEvent->setEventCode($ this->_eventConfig->getParent()->getParent()->getName()); try { $ callback = isset($ this->_eventConfig->post_dispatch) ? (string)$ this->_eventConfig->post_dispatch : false; $ defaulfCallback = 'postDispatchGeneric'; $ classMap = $ this->_getCallbackFunction($ callback, $ this->_controllerActionsHandler, $ defaulfCallback); $ handler = $ classMap['handler']; $ callback = $ classMap['callback']; if (!$ handler) { return; } if ($ handler->$ callback($ this->_eventConfig, $ loggingEvent, $ this)) { /** * Prepare additional info */ if ($ this->getCollectedAdditionalData()) { $ loggingEvent->setAdditionalInfo($ this->getCollectedAdditionalData()); } $ loggingEvent->save(); if ($ eventId = $ loggingEvent->getId()) { foreach ($ this->_eventChanges as $ changes) { if ($ changes && ($ changes->getOriginalData() || $ changes->getResultData())) { $ changes->setEventId($ eventId); $ changes->save(); } } } } } catch (Exception $ e) { Mage::logException($ e); }