/** * Ustawia wartosci standardowych kolumn wszystkich tabel logów */ protected function setDefaultData(Logger_Event $eventObject) { $identity = Zend_Auth::getInstance()->getIdentity(); if (!empty($identity)) { $eventObject->putAdditionalData('user_id', $identity->id); $eventObject->putAdditionalData('branch_id', $identity->jednostka['id']); $eventObject->putAdditionalData('user_login', $identity->login); $eventObject->putAdditionalData('web_name', $identity->jednostka['web_name']); } else { $eventObject->putAdditionalData('user_id', -1); $eventObject->putAdditionalData('branch_id', -1); $eventObject->putAdditionalData('user_login', 'identity not set'); $eventObject->putAdditionalData('web_name', 'identity not set'); } //$eventObject->putAdditionalData('host', 'dev-hawaje'); $eventObject->putAdditionalData('sessionID', Zend_Session::getId()); $eventObject->putAdditionalData('ip', $_SERVER['REMOTE_ADDR']); //$identity->last_login_ip; $eventObject->putAdditionalData('request_hash', $this->requestUniqueId); $eventObject->putAdditionalData('logic_action_hash', $this->businessActionUniqueId); $eventObject->putAdditionalData('timestamp', date('Y-m-d H:i:s')); }
protected function log($objSource, Logger_Event $eventObject) { $eventObject->putAdditionalData('logic_action_name', $this->logicActionName); parent::log($objSource, $eventObject); }