Permalink
Browse files

remove date for log detail

  • Loading branch information...
1 parent 60313ec commit 0c63fda0c0f2859426acbca33940aebfc868b056 @ronalfei committed Jan 13, 2014
Showing with 4 additions and 2 deletions.
  1. +4 −2 lib/core/log.class.php
View
@@ -31,8 +31,10 @@ static private function WriteToFile($level, $term, $display)
$file_path = _ACCESS_LOG_PATH.'codeAnt.'.$date.'.log';
$ip = util::getUserIp();
$agent = util::getUserBroswer();
- $datetime = date("Y-m-d H:i:s");
- $prefix = "[{$datetime}] [{$ip}] [{$agent}] [$level] {$_SERVER['REQUEST_URI']}({$filename}{$line}):";
+ //$datetime = date("Y-m-d H:i:s");
+ $datetime = date("H:i:s");
+ $request_uri = empty($_SERVER['REQUEST_URI'])?$_SERVER['SCRIPT_FILENAME']:$_SERVER['REQUEST_URI'];
+ $prefix = "[{$datetime}] [{$ip}] [{$agent}] [$level] {$request_uri}({$filename}{$line}):";
$data = $prefix.$term."\r\n";
file_put_contents($file_path, $data, FILE_APPEND);
if($display){

0 comments on commit 0c63fda

Please sign in to comment.