From 387e88635eec049fd3efc2038cf2adaf470bf7b6 Mon Sep 17 00:00:00 2001 From: Danial Date: Mon, 7 Oct 2024 12:44:57 +0700 Subject: [PATCH] feat: log message that can be used to mark that this log is come from recover middleware --- middleware/recover.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/middleware/recover.go b/middleware/recover.go index 2c563ea..9db7f31 100644 --- a/middleware/recover.go +++ b/middleware/recover.go @@ -17,7 +17,7 @@ func Recover(c http.Context) { defer func() { // grab any panic occurring if r := recover(); r != nil { - m := log.Map{"msg": debug.GetStackTraceInString(1)} + m := log.Map{"panic": "error panic recovered", "msg": debug.GetStackTraceInString(1)} log.Runtime(c).Error(m) prefixMsg := "Runtime Error - "