Welcome! Log In Create A New Profile

Advanced

How to debug from init_worker() and exit_worker()

jmm
August 31, 2023 08:51AM
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?
Subject Author Posted

How to debug from init_worker() and exit_worker()

jmm August 31, 2023 08:51AM

Re: How to debug from init_worker() and exit_worker()

jmm September 18, 2023 02:35PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 255
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