nginx-http-json-log icon indicating copy to clipboard operation
nginx-http-json-log copied to clipboard

how to exclude elements if empty or '-'

Open CybotTM opened this issue 9 years ago • 0 comments

How to exclude elements if empty or '-'?

instead of:

{
  "http_x_forwarded_for": "-",
  "http_user_agent": "ApacheBench/2.3",
  "body_bytes_sent": "612",
  "status": "200",
  "remote_user": "-",
  "remote_addr": "127.0.0.1",
  "time_local": "20/Jul/2015:23:48:14 -0700",
  "request": "GET / HTTP/1.0"
}

i would like to have:

{
  "http_user_agent": "ApacheBench/2.3",
  "body_bytes_sent": "612",
  "status": "200",
  "remote_addr": "127.0.0.1",
  "time_local": "20/Jul/2015:23:48:14 -0700",
  "request": "GET / HTTP/1.0"
}

CybotTM avatar Nov 29 '16 08:11 CybotTM