From 9620330c327bcdb806ab954f45810f9c5045ff32 Mon Sep 17 00:00:00 2001 From: danial Date: Mon, 5 May 2025 17:44:07 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20.gitignore=20=E6=96=87?= =?UTF-8?q?=E4=BB=B6=EF=BC=8C=E6=96=B0=E5=A2=9E=E5=AF=B9=20.DS=5FStore?= =?UTF-8?q?=E3=80=81main=20=E5=92=8C=20gateway=20=E7=9A=84=E5=BF=BD?= =?UTF-8?q?=E7=95=A5=E8=A7=84=E5=88=99=EF=BC=9B=E5=9C=A8=20main.go=20?= =?UTF-8?q?=E4=B8=AD=E4=BC=98=E5=8C=96=E6=97=A5=E5=BF=97=E8=AE=B0=E5=BD=95?= =?UTF-8?q?=EF=BC=8C=E4=BF=AE=E6=94=B9=E8=AF=B7=E6=B1=82=E4=BD=93=E7=9A=84?= =?UTF-8?q?=E6=97=A5=E5=BF=97=E8=BE=93=E5=87=BA=E4=B8=BA=20ctx.Input.Data(?= =?UTF-8?q?)=EF=BC=8C=E6=8F=90=E5=8D=87=E6=97=A5=E5=BF=97=E7=9A=84?= =?UTF-8?q?=E5=87=86=E7=A1=AE=E6=80=A7=E5=92=8C=E5=8F=AF=E8=AF=BB=E6=80=A7?= =?UTF-8?q?=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 3 +++ main.go | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index d02a7f6..98ed8ec 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,6 @@ .DS_Store .DS_Store? /gateway.exe +.DS_Store +main +gateway diff --git a/main.go b/main.go index 27b1960..fdcdaf1 100644 --- a/main.go +++ b/main.go @@ -23,7 +23,7 @@ import ( ) func logRequest(ctx *context.Context) { - otelTrace.Logger.WithContext(otelTrace.InitCtx).Info("Request:", zap.String("method", ctx.Input.Method()), zap.String("uri", ctx.Input.URI()), zap.String("ip", ctx.Input.IP()), zap.Any("params", ctx.Input.Params()), zap.Any("body", ctx.Input.RequestBody)) + otelTrace.Logger.WithContext(otelTrace.InitCtx).Info("Request:", zap.String("method", ctx.Input.Method()), zap.String("uri", ctx.Input.URI()), zap.String("ip", ctx.Input.IP()), zap.Any("params", ctx.Input.Params()), zap.Any("body", ctx.Input.Data())) } func main() {