Fix logging when first arg is a context.Context without a logger

This commit is contained in:
Deluan
2020-04-26 19:33:57 -04:00
parent b44218fdcc
commit 46f1b33812
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -180,6 +180,7 @@ func extractLogger(ctx interface{}) (*logrus.Entry, error) {
if logger != nil {
return logger.(*logrus.Entry), nil
}
return extractLogger(NewContext(ctx))
case *http.Request:
return extractLogger(ctx.Context())
}