完善掉线诊断并优化二维码加载
This commit is contained in:
@@ -48,6 +48,18 @@ func RequestLogger(logger *zap.Logger) gin.HandlerFunc {
|
||||
if adminID, ok := c.Get(ContextAdminID); ok {
|
||||
fields = append(fields, zap.Any("admin_id", adminID))
|
||||
}
|
||||
if reason, ok := c.Get(ContextAuthFailureReason); ok {
|
||||
fields = append(fields, zap.Any("auth_failure_reason", reason))
|
||||
}
|
||||
if source, ok := c.Get(ContextAuthTokenSource); ok {
|
||||
fields = append(fields, zap.Any("auth_token_source", source))
|
||||
}
|
||||
if tokenVersion, ok := c.Get(ContextAuthTokenVersion); ok {
|
||||
fields = append(fields, zap.Any("auth_token_version", tokenVersion))
|
||||
}
|
||||
if currentVersion, ok := c.Get(ContextAuthCurrentVersion); ok {
|
||||
fields = append(fields, zap.Any("auth_current_token_version", currentVersion))
|
||||
}
|
||||
if len(c.Errors) > 0 {
|
||||
fields = append(fields, zap.String("errors", strings.TrimSpace(c.Errors.String())))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user