Writing the log from lua looks like a good idea. Though I have few
questions about how to implement this.
Is there any way to tap into the USR1 in order to reopen the log files
as nginx would.
Also if I open a file in init_by_lua would there be any race
conditions if multiple workers write to the same file?
On 04.07.2013, at 01:52, "Yichun Zhang (agentzh)" <age...@gmail.com> wrote:
> Hello!
>
> On Wed, Jul 3, 2013 at 1:25 PM, Calin Don wrote:
>> If a variable value is set by a lua script it's value is escaped when it's
>> send to the access log.
>
> No, escaping is done by the standard ngx_http_log_module rather than
> ngx_lua. It's not in the control of ngx_lua at all. You should ask on
> the nginx mailing list instead.
>
> Also, you could consider logging directly from within Lua. Then you
> can bypass the automatic variable value escaping of the standard
> access_log writer.
>
> Best regards,
> -agentzh.
>
>