From 491855876b94fd607e19fd34887c96ccfc5fd53a Mon Sep 17 00:00:00 2001 From: DiheChen <52123645+DiheChen@users.noreply.github.com> Date: Sat, 3 Jun 2023 22:45:46 +0800 Subject: [PATCH] =?UTF-8?q?:bug:=20Fix:=20=E4=BF=AE=E5=A4=8D=E5=9B=A0=20lo?= =?UTF-8?q?guru=20=E6=9B=B4=E6=96=B0=E5=AF=BC=E8=87=B4=E7=9A=84=E5=90=AF?= =?UTF-8?q?=E5=8A=A8=E5=92=8C=E5=85=B3=E9=97=AD=E6=97=A5=E5=BF=97=20name?= =?UTF-8?q?=20=E4=B8=8D=E6=AD=A3=E5=B8=B8=20(#2080)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Ju4tCode <42488585+yanyongyu@users.noreply.github.com> --- nonebot/log.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nonebot/log.py b/nonebot/log.py index 59e031b9..58a420ad 100644 --- a/nonebot/log.py +++ b/nonebot/log.py @@ -54,7 +54,7 @@ class LoguruHandler(logging.Handler): # pragma: no cover except ValueError: level = record.levelno - frame, depth = logging.currentframe(), 2 + frame, depth = sys._getframe(6), 6 while frame and frame.f_code.co_filename == logging.__file__: frame = frame.f_back depth += 1