Hello!
On Fri, Aug 5, 2016 at 1:53 PM, <zz....@gmail.com> wrote:
> I was trying to measure the time it takes to watermark a photo, and then
> outputs the duration to log by calling ngx.log(). But somehow it was not
> outputting anything to error_log. Can anyone point out what might be wrong
> with code below? Note that s3.conf below invokes ngx.log().
>
Are you 100% sure your ngx.log() call is indeed reached? Maybe your
request does not hit that content_by_lua handler at all or maybe just
not reach as far as that Lua statement. One quick way to verify that
is to put the following Lua statement (or something similar) on code
paths that you believe must have been reached:
error("BAD BAD BAD!")
If you do not see BAD in your error.log then the execution flow simply
does not reach that point.
BTW, try making your nginx.conf minimal before reporting the issue.
Most often, you can find your own configuration mistake while doing
minimization ;)
Another common mistake is to configure error_log to use a very high
filtering level like alert or crit. Ensure that you have checked all
your error_log directive settings in all you *.conf files (inner
scoped error_log can override the outer scoped one).
Good luck!
Best regards,
-agentzh