From 092bb9c58f7758b60034e4629a791b67780d4fcc Mon Sep 17 00:00:00 2001 From: Tyler Hawkins <3319104+tyzbit@users.noreply.github.com> Date: Tue, 3 May 2022 19:56:08 -0400 Subject: [PATCH] fix: gin log json --- init.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/init.go b/init.go index 233918e..c827bd4 100644 --- a/init.go +++ b/init.go @@ -51,7 +51,7 @@ func (w *Watcher) InitLogging() { } func GinJSONFormatter(param gin.LogFormatterParams) string { - jsonFormat := `{"time":"%s","clientip":"%s","method":"%s","uri":"%s","status":%3d,"latency":"%v","message":"%s","host":"%s","useragent":"%s","proto","%s","error_msg":"%s","size":%d}` + "\n" + jsonFormat := `{"time":"%s","clientip":"%s","method":"%s","uri":"%s","status":%3d,"latency":"%v","message":"%s","host":"%s","useragent":"%s","proto":"%s","error_msg":"%s","size":%d}` + "\n" return fmt.Sprintf(jsonFormat, param.TimeStamp.Format(TimeFormatter), param.ClientIP,