From 81b9ca8d0e5a8e34a3f5144bcb64f5538ffbc4c9 Mon Sep 17 00:00:00 2001 From: Lizongdi <1210855344@qq.com> Date: Wed, 16 Sep 2026 15:13:11 +0800 Subject: [PATCH] =?UTF-8?q?=E3=80=90=E4=B8=BB=E7=BA=BF=E5=BE=85=E5=90=88?= =?UTF-8?q?=E3=80=91=E8=A7=A3=E5=86=B3=E4=B8=8A=E4=B8=80=E6=9D=A1=E4=B8=AD?= =?UTF-8?q?=E6=89=80=E8=BF=B0=E7=9A=84=E6=97=A5=E5=BF=97=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- library/log/elog_file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/library/log/elog_file.c b/library/log/elog_file.c index 591ddf5..9e380eb 100644 --- a/library/log/elog_file.c +++ b/library/log/elog_file.c @@ -85,7 +85,7 @@ static bool elog_file_rotate(void) fp = NULL; for (n = local_cfg.max_rotate - 1; n >= 0; --n) { - RD_SNPRINTF(oldpath + base, SUFFIX_LEN, n ? ".%d" : "", n - 1); + RD_SNPRINTF(oldpath + base, SUFFIX_LEN, n ? ".%04d" : "", n - 1); if (n > 9999) n = 9999; RD_SNPRINTF(newpath + base, SUFFIX_LEN, ".%04d", n); /* remove the old file */