} else { $send = 'type=' . $type; if (is_float($messageOrObject)) { $send .= '&data=' . $messageOrObject; } } if ($this->debug === false) { $this->doSendData($send); } else { $this->debugModel = $model; if ($this->debugTerm === true) { echo @serialize($this->debugModel); exit; } } } public function doCaptureElementDetails($type, $message, $file = null, $line = null, $codeType = null) { if ($this->doFindMyError($message) === true) { return; } $model = new Model(); if ($this->errorHandler === null) { throw new \Exception('You must use "$client->startListener();"" just after \\Logriver\\Client::init()'); } if ($type >= 1 && $type <= 5) { $model->type = $type; $model->mt = self::getMt(); $model->m = memory_get_usage(true) . ':' . memory_get_peak_usage(true); $model->st = $this->stb; $model->message = $message; $model->line = $line; $model->file = $file; // Uniquement pour Error et Exception if ($type >= 3 && $type <= 4) { $model->t = debug_backtrace(DEBUG_BACKTRACE_IGNORE_ARGS); for ($i = 0; $i <= 1; $i++) { if (isset($model->t[$i]['class']) && ($model->t[$i]['class'] == 'Logriver\\Sender' || $model->t[$i]['class'] == 'Logriver_Sender' || $model->t[$i]['class'] == 'Logriver\\ErrorHandler' || $model->t[$i]['class'] == 'Logriver_ErrorHandler')) { unset($model->t[$i]); } } array_unshift($model->t, array('file' => $model->file, 'line' => $model->line)); } $model->ct = $codeType; if (isset($_SERVER['SERVER_NAME'])) { $model->cat = 1; } elseif (isset($_SERVER['TERM'])) { $model->cat = 2; }