how to use ngx_log_debug during configuration of a core module

Maxim Dounin mdounin at mdounin.ru
Wed Mar 24 17:40:24 MSK 2010


Hello!

On Wed, Mar 24, 2010 at 03:04:00PM +0100, Manlio Perillo wrote:

> I'm having some troubles at using ngx_log_debug during configuration of
> a core module I'm writing.
> 
> I want to output some log info in the init_conf callback function but:
> 
> * If I use cycle->log, the error level is fixed and set to NGX_LOG_INFO,
>   so debug info will never be logged
> * If I use cycle->new_log, the error level is correctly set, but no info
>   is logged to the file.
>   If I set log destination to "stderr", info is correctly logged
> 
> 
> Should I simply use ngx_log_error(NGX_LOG_INFO, cycle->log)?

Yes.

Maxim Dounin



More information about the nginx-devel mailing list