in an panic the log now contains the stacktrace
Dieser Commit ist enthalten in:
Ursprung
37f4f912a9
Commit
198881d347
|
@ -26,6 +26,7 @@ func LogMiddleware(c *gin.Context) {
|
||||||
c.Header("requestid", xid.String())
|
c.Header("requestid", xid.String())
|
||||||
c.AbortWithStatus(http.StatusInternalServerError)
|
c.AbortWithStatus(http.StatusInternalServerError)
|
||||||
entry = log.Error().Err(err).Int("statuscode", 500)
|
entry = log.Error().Err(err).Int("statuscode", 500)
|
||||||
|
entry.Stack()
|
||||||
} else {
|
} else {
|
||||||
statuscode := c.Writer.Status()
|
statuscode := c.Writer.Status()
|
||||||
switch {
|
switch {
|
||||||
|
|
Laden…
In neuem Issue referenzieren