|
|
|
@ -141,11 +141,11 @@ func (zl *ApiZapLog) Middleware(ctx context.Context, request gorequest.Response)
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "request_params",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(request.RequestParams),
|
|
|
|
|
Interface: request.RequestParams, //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "request_header",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(request.RequestHeader),
|
|
|
|
|
Interface: request.RequestHeader, //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "request_ip",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
@ -153,7 +153,7 @@ func (zl *ApiZapLog) Middleware(ctx context.Context, request gorequest.Response)
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_header",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(request.ResponseHeader),
|
|
|
|
|
Interface: request.ResponseHeader, //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_status_code",
|
|
|
|
|
Type: zapcore.Int64Type,
|
|
|
|
@ -161,7 +161,7 @@ func (zl *ApiZapLog) Middleware(ctx context.Context, request gorequest.Response)
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_body",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(dorm.JsonDecodeNoError(request.ResponseBody)),
|
|
|
|
|
Interface: dorm.JsonDecodeNoError(request.ResponseBody), //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_content_length",
|
|
|
|
|
Type: zapcore.Int64Type,
|
|
|
|
@ -228,11 +228,11 @@ func (zl *ApiZapLog) MiddlewareXml(ctx context.Context, request gorequest.Respon
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "request_params",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(request.RequestParams),
|
|
|
|
|
Interface: request.RequestParams, //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "request_header",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(request.RequestHeader),
|
|
|
|
|
Interface: request.RequestHeader, //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "request_ip",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
@ -240,7 +240,7 @@ func (zl *ApiZapLog) MiddlewareXml(ctx context.Context, request gorequest.Respon
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_header",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(request.ResponseHeader),
|
|
|
|
|
Interface: request.ResponseHeader, //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_status_code",
|
|
|
|
|
Type: zapcore.Int64Type,
|
|
|
|
@ -248,7 +248,7 @@ func (zl *ApiZapLog) MiddlewareXml(ctx context.Context, request gorequest.Respon
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_body",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.XmlEncodeNoError(dorm.XmlDecodeNoError(request.ResponseBody)),
|
|
|
|
|
Interface: dorm.XmlDecodeNoError(request.ResponseBody), //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_content_length",
|
|
|
|
|
Type: zapcore.Int64Type,
|
|
|
|
@ -315,11 +315,11 @@ func (zl *ApiZapLog) MiddlewareCustom(ctx context.Context, api string, request g
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "request_params",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(request.RequestParams),
|
|
|
|
|
Interface: request.RequestParams, //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "request_header",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(request.RequestHeader),
|
|
|
|
|
Interface: request.RequestHeader, //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "request_ip",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
@ -327,7 +327,7 @@ func (zl *ApiZapLog) MiddlewareCustom(ctx context.Context, api string, request g
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_header",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(request.ResponseHeader),
|
|
|
|
|
Interface: request.ResponseHeader, //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_status_code",
|
|
|
|
|
Type: zapcore.Int64Type,
|
|
|
|
@ -335,7 +335,7 @@ func (zl *ApiZapLog) MiddlewareCustom(ctx context.Context, api string, request g
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_body",
|
|
|
|
|
Type: zapcore.StringType,
|
|
|
|
|
String: dorm.JsonEncodeNoError(dorm.JsonDecodeNoError(request.ResponseBody)),
|
|
|
|
|
Interface: dorm.JsonDecodeNoError(request.ResponseBody), //
|
|
|
|
|
}, zapcore.Field{
|
|
|
|
|
Key: "response_content_length",
|
|
|
|
|
Type: zapcore.Int64Type,
|
|
|
|
|