Welcome! Log In Create A New Profile

Advanced

Re: Disable access log escaping

Francis Daly
July 03, 2013 06:34PM
On Wed, Jul 03, 2013 at 10:54:15PM +0300, Calin Don wrote:

Hi there,

> I'm using a module which sets some data formated as json to a variable. I'm
> trying to log this variable using the access log, but the content is
> escaped. I'm getting something like {\x22foo\x22:\x22bar\x22} instead of
> {'foo':'bar'}.

\x22 should correspond to ".
' would correspond to \x27, but I don't think that is escaped (I didn't
look at the newest source).

Anyway...

> Is there a way to disable the escaping per access_log or per log_format?

I don't believe so (using only nginx configuration). It will probably be
easier for your log-reading code to unescape the four characters starting
"\x" before further processing.

f
--
Francis Daly francis@daoine.org

_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

Disable access log escaping

Calin Don July 03, 2013 03:56PM

Re: Disable access log escaping

Francis Daly July 03, 2013 06:34PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 112
Record Number of Users: 8 on April 13, 2023
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready