封装trace方法用于远程调试输出

This commit is contained in:
thinkphp
2015-12-10 19:25:21 +08:00
parent 0a1cc5b73a
commit b39b4ed15d
2 changed files with 29 additions and 17 deletions

View File

@@ -305,3 +305,15 @@ function S($name, $value = '', $options = null)
return $cache->set($name, $value, $expire);
}
}
/**
* 添加Trace记录到SocketLog
* @param mixed $log log信息 支持字符串和数组
* @param string $level 日志级别
* @param string $css 样式
* @return void|array
*/
function trace($log,$level='log',$css='')
{
return think\Slog::record($level,$log,$css);
}