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