public function makeLog() { $put = ''; foreach ($_REQUEST as $key => $value) { $value = is_array($value) ? $this->showArray($value) : $value; $put .= "[{$key}: {$value}] \n"; } $sqlerror = ''; $trace = $this->getTrace(); if (!$trace[0]['line']) { $sqlerror = "Error: {$this->errorInfo['file']}(line: {$this->errorInfo['line']}) <br /> {$trace[0]['class']}{$trace[0]['type']}{$trace[0]['function']} \r\n"; } else { foreach ($this->getTrace() as $key => $value) { if (isset($value['file'])) { $sqlerror .= "\r\nError[{$key}]: {$value['file']}(line: {$value['line']}) [{$value['class']}{$value['type']}{$value['function']}]"; $sqlerror .= "\r\nArgs: (" . $this->showArray($value['args']) . ")"; } else { $sqlerror .= "\r\nError[{$key}]: [{$value['class']}{$value['type']}{$value['function']}]"; $sqlerror .= "\r\nArgs: (" . $this->showArray($value['args']) . ")"; } } } helper_log::writeLog("Error-Msg:{$this->message},\n FileTrace: {$sqlerror}, \nDrive-Info: {$this->errorInfo['drive']}, Error-Url: {$_SERVER['QUERY_STRING']},\nGET&&POST:" . $put, $this->errorInfo['drive']); }
function logs($msg, $type = 'php') { helper_log::writeLog($msg, $type); }