From 84f9ffab46897635558b26170287c794cd8869a8 Mon Sep 17 00:00:00 2001 From: thinkphp Date: Mon, 5 Dec 2016 16:36:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=B9=E8=BF=9B=E5=91=BD=E4=BB=A4=E8=A1=8C?= =?UTF-8?q?=E4=B8=8B=E7=9A=84=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/think/Log.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/library/think/Log.php b/library/think/Log.php index 943e78c8..413e2761 100644 --- a/library/think/Log.php +++ b/library/think/Log.php @@ -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(); + } } /**