123
This commit is contained in:
parent
1c29af53b3
commit
e287fddc48
@ -1,6 +1,7 @@
|
||||
package lxzap
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"net"
|
||||
"net/http"
|
||||
"net/http/httputil"
|
||||
@ -138,3 +139,9 @@ func GinRecovery(stack bool) gin.HandlerFunc {
|
||||
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