Quantcast
Channel: Nginx Forum - How to...
Viewing all articles
Browse latest Browse all 4759

how to Remove access_log prefix in syslog (json format)

$
0
0
Hi
I wanna try to send access_log via syslog in json format!
this is my configuration!

log_format graylog_format escape=json $request_final_log;
access_log syslog:server=w.x.y.z:port,tag=,nohostname graylog_format;


$request_final_log is a nginx variable which contains my json data at log phase but at final step, I can capture output data which has : character at start of json and I can't remove it. so my json parsing won't be successful and all of double quotation are escaped like : {\"id\":\"a2356\"}
can I remove prefix : character using nginx logs_format or ...?
thanks a lot...
Best,
Hadi

Viewing all articles
Browse latest Browse all 4759

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>