mirror of
https://gitee.com/fastadminnet/framework.git
synced 2026-07-06 15:02:47 +08:00
数据库和缓存读写计数调整 增加页面Trace日志驱动(需要设置'response_exit'=>false) Log::record方法支持字符串之外的变量输出
This commit is contained in:
@@ -64,6 +64,9 @@ class Log
|
||||
*/
|
||||
public static function record($msg, $type = 'log')
|
||||
{
|
||||
if (!is_string($msg)) {
|
||||
$msg = print_r($msg, true);
|
||||
}
|
||||
self::$log[] = ['type' => $type, 'msg' => $msg];
|
||||
}
|
||||
|
||||
@@ -84,6 +87,9 @@ class Log
|
||||
*/
|
||||
public static function write($msg, $type)
|
||||
{
|
||||
if (!is_string($msg)) {
|
||||
$msg = print_r($msg, true);
|
||||
}
|
||||
if ('error' == $type) {
|
||||
// 预留预警通知接口
|
||||
self::$alarm && self::$alarm->send($msg);
|
||||
|
||||
Reference in New Issue
Block a user