mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-07 11:40:01 +08:00
db
This commit is contained in:
parent
db51b597da
commit
9bc659e8f0
@ -123,6 +123,22 @@ type FuncInfo struct {
|
||||
|
||||
type Args map[string]interface{}
|
||||
|
||||
func (a Args) String() string {
|
||||
var s string
|
||||
var hasElement bool
|
||||
for k, v := range a {
|
||||
if !hasElement {
|
||||
s += "{"
|
||||
hasElement = true
|
||||
}
|
||||
s += fmt.Sprintf("%s:%d", k, v)
|
||||
}
|
||||
if hasElement {
|
||||
s += "}"
|
||||
}
|
||||
return s
|
||||
}
|
||||
|
||||
func SetContextInfo(ctx context.Context, funcName string, err error, args ...interface{}) {
|
||||
t := ctx.Value(TraceLogKey).(*ApiInfo)
|
||||
var funcInfo FuncInfo
|
||||
|
Loading…
x
Reference in New Issue
Block a user