Commit 5f6484ca authored by cuiweifeng's avatar cuiweifeng

update : exception log

parent 3839843b
...@@ -47,15 +47,16 @@ class ExceptionHandler ...@@ -47,15 +47,16 @@ class ExceptionHandler
*/ */
private function recordErrorLog($e) private function recordErrorLog($e)
{ {
if ($e instanceof \ErrorException || $e instanceof \Exception || $e instanceof \Error) { if($e instanceof \ErrorException || $e instanceof \Exception || $e instanceof \Error){
$message = $e->getMessage(); $message = $e->getMessage();
$file_name = $e->getFile(); $file_name = $e->getFile();
$line_num = $e->getLine(); $line_num = $e->getLine();
// $msg = ' file_name : ' . $file_name . ' line_num : ' . $line_num . ' message : ' . $message; $msg = ' file_name : '.$file_name . ' line_num : '.$line_num . ' message : ' . $message;
// FileLog::error(get_class($e) . ' handler', $msg, $e, 'luhongguang@yidian-inc.com');
} FileLog::error(get_class($e) . ' handler', $msg, $e);
if (is_string($e) || is_int($e)) {
}elseif( is_string($e) || is_int($e)){
FileLog::error('exception handler', $e); FileLog::error('exception handler', $e);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment