/** * Exports log [[messages]] to a specific destination. * Child classes must implement this method. */ public function export() { if (self::$send == false) { if (!in_array(Yii::$app->getResponse()->statusCode, $this->ignore_statuses)) { Client::get()->sent($this->exportMessages(), LogmanClient::SOURCE_TARGET); self::$send = true; } } }
/** * Report Exception * @param $ex \ErrorException * @return mixed */ private function reportException($ex) { $data = ['class' => get_class($ex), 'error_group' => $ex->getMessage() . ':' . $ex->getLine(), 'line_number' => $ex->getLine(), 'file_name' => $ex->getFile(), 'message' => $ex->getMessage(), 'stack_trace' => $ex->getTraceAsString()]; Client::get()->sent($data, LogClient::SOURCE_HANDLER); }