改进命令行下的日志记录

This commit is contained in:
thinkphp
2016-12-05 16:36:50 +08:00
parent 7f3fe01504
commit 84f9ffab46

View File

@@ -84,6 +84,10 @@ class Log
public static function record($msg, $type = 'log')
{
self::$log[$type][] = $msg;
if (IS_CLI && count(self::$log[$type]) > 100) {
// 命令行下面日志写入改进
self::save();
}
}
/**