...
|
...
|
@@ -10,13 +10,13 @@ import ( |
|
|
|
|
|
func CreateRequstLogFilter(logger *logs.BeeLogger) func(ctx *context.Context) {
|
|
|
return func(ctx *context.Context) {
|
|
|
requestId := fmt.Sprintf("%v.%v.%v \n Header:%v", ctx.Input.Method(), ctx.Input.URI(), time.Now().UnixNano(), ctx.Request.Header)
|
|
|
requestId := fmt.Sprintf("%v.%v.%v ", ctx.Input.Method(), ctx.Input.URI(), time.Now().UnixNano())
|
|
|
ctx.Request.Header.Add("requestId", requestId)
|
|
|
var body string = "{}"
|
|
|
if ctx.Input.GetData("requestBody") != nil {
|
|
|
body = string(ctx.Input.GetData("requestBody").([]byte))
|
|
|
}
|
|
|
logger.Debug(fmt.Sprintf("====>Recv RequestId:%s BodyData:%s", requestId, body))
|
|
|
logger.Debug(fmt.Sprintf("====>Recv RequestId:%s BodyData:%s \n Header:%v", requestId, body, ctx.Request.Header))
|
|
|
}
|
|
|
}
|
|
|
|
...
|
...
|
|