I want to print debug messages from my module's init_worker() and exit_worker() functions like so:
ngx_log_debug0(NGX_LOG_DEBUG, cycle->log, 0, "init worker");
Unfortunately, this doesn't print anything.
After some trial and error, I discovered the only way to print anything to cycle->log from these two functions is by calling ngx_log_error(), and only at these levels:
NGX_LOG_EMERG
NGX_LOG_ALERT
NGX_LOG_CRIT
NGX_LOG_ERR
My Nginx server is correctly compiled with "--with-debug" and my error_log level is "debug" (I tried "debug_http" too).
Am I doing something wrong?