mirror of
https://github.com/openimsdk/open-im-server.git
synced 2025-08-11 05:46:27 +08:00
db
This commit is contained in:
parent
db51b597da
commit
9bc659e8f0
@ -123,6 +123,22 @@ type FuncInfo struct {
|
|||||||
|
|
||||||
type Args map[string]interface{}
|
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{}) {
|
func SetContextInfo(ctx context.Context, funcName string, err error, args ...interface{}) {
|
||||||
t := ctx.Value(TraceLogKey).(*ApiInfo)
|
t := ctx.Value(TraceLogKey).(*ApiInfo)
|
||||||
var funcInfo FuncInfo
|
var funcInfo FuncInfo
|
||||||
|
Loading…
x
Reference in New Issue
Block a user