From ce061846385b063fb8aaa10162639d6a587ab9a1 Mon Sep 17 00:00:00 2001
From: sunao <sun_ao@foxmail.com>
Date: Wed, 4 Sep 2024 16:31:03 +0800
Subject: [PATCH] =?UTF-8?q?update:=E5=A2=9E=E5=8A=A0=E9=94=99=E8=AF=AF?=
 =?UTF-8?q?=E6=97=A5=E5=BF=97=E6=98=8E=E7=BB=86?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 yitong-sdk.js | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/yitong-sdk.js b/yitong-sdk.js
index 4c9952c..da01505 100644
--- a/yitong-sdk.js
+++ b/yitong-sdk.js
@@ -209,7 +209,16 @@ function errorHandler() {
         } catch (e) {
             ctx.status = 200;
             ctx.body = transformError(e);
-            log.error(e);
+            log.error({
+                url: ctx.request.url,
+                body: ctx.request.body,
+                headers: {
+                    "user-agent": ctx.headers["user-agent"],
+                    "x-real-ip": ctx.headers["x-real-ip"],
+                    "x-forwarded-for": ctx.headers["x-forwarded-for"]
+                },
+                error: e
+            });
         }
     };
 }
-- 
2.27.0