title: nginx logging $request_body as hexadecimal
body: <p>I am trying to log the request body of requests to my api and nginx is turning all quotes (and some other characters like spaces and tabs) into hexadecimal characters.</p>
  
  <p>Here is my log format</p>
  
  <pre><code>log_format postdata '{"ts": "$time_iso8601", "status": $status, "req": "$uri", "meth": "$request_method", "body": "$request_body"}';
  </code></pre>
  
  <p>Here is what gets logged</p>
  
  <pre><code>{"ts": "2015-05-20T15:31:11-07:00", "status": 400, "req": "/v2/track", "meth": "POST", "body": {\x22id\x22:\x22user id\x22}}
  </code></pre>
  
  <p>How can I prevent this so that the resulting log line is</p>
  
  <pre><code>{"ts": "2015-05-20T15:31:11-07:00", "status": 400, "req": "/v2/track", "meth": "POST", "body": {"id":"user id"}}
  </code></pre>