123
This commit is contained in:
parent
1c29af53b3
commit
e287fddc48
@ -1,6 +1,7 @@
|
|||||||
package lxzap
|
package lxzap
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"net/http/httputil"
|
"net/http/httputil"
|
||||||
@ -138,3 +139,9 @@ func GinRecovery(stack bool) gin.HandlerFunc {
|
|||||||
c.Next()
|
c.Next()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func Log(msg string, c *gin.Context) {
|
||||||
|
v, _ := c.Get("X-Span-ID")
|
||||||
|
spanId := fmt.Sprintf("%v", v)
|
||||||
|
zap.L().Info("spanId:" + spanId + "log:" + msg)
|
||||||
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user