Skip to content

Commit

Permalink
更新 redis log
Browse files Browse the repository at this point in the history
  • Loading branch information
hlf513 committed Jan 4, 2020
1 parent 261042d commit e630def
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion config/redis/command.go
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,13 @@ func (r redisConn) Do(commandName string, args ...interface{}) (interface{}, err
if r.span != nil {
ext.SamplingPriority.Set(r.span, 1)
r.span.SetTag("error", true)
r.span.LogKV("error", err.Error())
}
return nil, err
}
if r.span != nil {
r.span.LogKV("value", replay)
value, _ := redis.String(replay, nil)
r.span.LogKV("cmd", commandName, "args", args, "value", value)
}
return replay, nil
}
Expand Down

0 comments on commit e630def

Please sign in to comment.