Skip to content

日志写为json格式的问题 #949

Discussion options

You must be logged in to vote

基于问题描述,做了一个配置:

[Template]
RequestTemplate = "{\"ReqLog_type\":\"REQUEST_LOG\",\"local_time\":\"$time\",\"clientip\":\"$ses_clientip\" ,\"http_method\":\"?req_method\",\"http_scheme\":\"?req_schema\",\"host\":\"$host\",\"url\":\"$url\",\"status\":\"$status_code\",\"reqbodylen\":\"$req_body_len\",\"respbodylen\":\"$res_body_len\",\"time_all\":\"$all_time\",\"time_connect_rs\":\"$connect_time\",\"product\":\"$product\",\"backend\":\"$backend\",\"pro_version\":\"$res_proto\",\"req_seq\":\"$req_nth\",\"clientport\":\"?remote_client_port\",\"user_agent\":\"User-Agent $req_header\",\"error\":\"$error\",\"xff\":\"X-Forwarded-For req_header\",\"xrealip\":\"${X-Real-IP}req_header\",\"rrdt\":\"$read…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by lf2186
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants