mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-07 07:12:47 +08:00
增加服务器IP记录,支持分步式部署日志管理
This commit is contained in:
@@ -32,7 +32,7 @@ class Sae {
|
||||
public function write($log,$destination='') {
|
||||
static $is_debug = null;
|
||||
$now = date($this->config['log_time_format']);
|
||||
$logstr = "[{$now}] ".$_SERVER['REMOTE_ADDR'].' '.$_SERVER['REQUEST_URI']."\r\n{$log}\r\n";
|
||||
$logstr = "[{$now}] {$_SERVER['SERVER_ADDR']} {$_SERVER['REMOTE_ADDR']} {$_SERVER['REQUEST_URI']}\r\n{$log}\r\n";
|
||||
if(is_null($is_debug)){
|
||||
preg_replace('@(\w+)\=([^;]*)@e', '$appSettings[\'\\1\']="\\2";', $_SERVER['HTTP_APPCOOKIE']);
|
||||
$is_debug = in_array($_SERVER['HTTP_APPVERSION'], explode(',', $appSettings['debug'])) ? true : false;
|
||||
|
||||
Reference in New Issue
Block a user