public function pushError($error) { $di = DI::getDefault(); if (isset($di['request'])) { $error['url'] = $di['request']->getHttpHost() . $di['request']->getUri(); } if (isset($di['local']->rawData['service'])) { $error['callinfo'] = json_encode($di['local']->rawData); if ($di['local']->rawData['service'] == 'Api\\Services\\Monitor') { return; } } $error['app'] = Monitor::getProject(); $error['serverip'] = sprintf("%u\n", ip2long(Monitor::getLocalip())); $di['remote']->swooleCall(array('service' => 'Api\\Services\\Monitor', 'method' => 'addlog', 'args' => array($error))); }
private function pushError($rawData, $error) { $di = \Phalcon\DI::getDefault(); if (isset($di['request'])) { $error['url'] = $di['request']->getHttpHost() . $di['request']->getUri(); } $error['callinfo'] = json_encode($rawData); $error['app'] = Monitor::getProject(); $error['serverip'] = sprintf("%u\n", ip2long(Monitor::getLocalip())); $this->swooleCall(array('service' => 'Api\\Services\\Monitor', 'method' => 'addlog', 'args' => array($error))); }