From 8e32bc0d7d878cbce6b2904d768d5a33c40c8307 Mon Sep 17 00:00:00 2001 From: ZF sun <34314687@qq.com> Date: Thu, 22 Jan 2026 09:55:59 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E4=BF=AE=E5=A4=8D=E6=97=A5=E5=BF=97?= =?UTF-8?q?=E6=96=87=E4=BB=B6=E5=90=8D=E7=94=9F=E6=88=90=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 当指定文件名时,在文件名前添加日期前缀以区分不同日期的日志文件 --- src/app/common.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/common.php b/src/app/common.php index 1cb06d991..ecb780efd 100644 --- a/src/app/common.php +++ b/src/app/common.php @@ -2163,6 +2163,8 @@ function log_write(string $message, string $level = 'info', string $filename = ' // 生成日志文件名 if (empty($filename)) { $filename = date('Y-m-d') . '.log'; + } else { + $filename = date('Y-m-d') . '-' . $filename; } // 日志文件路径