From 2b97b00e8af6dfdff235307afa3c296ebf3b14ae Mon Sep 17 00:00:00 2001 From: wangchunsheng Date: Sat, 2 Feb 2013 03:02:50 +0000 Subject: [PATCH] * adjust the log format for cli mode. --- framework/router.class.php | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/framework/router.class.php b/framework/router.class.php index 30b6100660..50bb2596b7 100755 --- a/framework/router.class.php +++ b/framework/router.class.php @@ -1306,13 +1306,25 @@ class router $trace = debug_backtrace(); extract($trace[0]); extract($trace[1]); - $log .= ", last called by $file on $line through function $function."; + $log .= ", last called by $file on line $line through function $function.\n"; error_log($log); /* If exit, output the error. */ if($exit) { - if($this->config->debug) die("$log"); + if($this->config->debug) + { + if(PHP_SAPI != 'cli') + { + $htmlError = ""; + $htmlError .= "$log"; + die($htmlError); + } + else + { + die($log); + } + } die(); } }