From feb49e71fb9a7ca6abe5f5f3d1caf14a57a88139 Mon Sep 17 00:00:00 2001
From: mckay <wchpub@163.com>
Date: Sat, 30 Nov 2024 18:34:51 +0800
Subject: [PATCH] =?UTF-8?q?fix:=20=E6=96=87=E4=BB=B6=E6=A0=BC=E5=BC=8F?=
 =?UTF-8?q?=E5=8C=96=E5=99=A8=E4=B8=AD=E4=BD=BF=E7=94=A8=E4=BA=86=20caller?=
 =?UTF-8?q?=5Finfo=20=E4=BD=86=E6=B2=A1=E6=9C=89=E6=AD=A3=E7=A1=AE?=
 =?UTF-8?q?=E8=AE=BE=E7=BD=AE?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 brep2sdf/utils/logger.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/brep2sdf/utils/logger.py b/brep2sdf/utils/logger.py
index 7de2ae3..cc51235 100644
--- a/brep2sdf/utils/logger.py
+++ b/brep2sdf/utils/logger.py
@@ -102,8 +102,9 @@ class BRepLogger:
             exc_info=kwargs.get('exc_info'),
         )
         
-        # 获取真实的调用者信息
-        record.caller_info = self._get_caller_info(3)  # 增加stack_offset以跳过更多调用层
+        # 确保设置 caller_info
+        if not hasattr(record, 'caller_info'):
+            record.caller_info = self._get_caller_info(3)
         
         # 处理日志记录
         self.logger.handle(record)