-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Maxim Dounin ha scritto:
> [...]
>> I have logged the log name and fd of cycle->log, and I have:
>> log->name: (null), log->fd: 3
>>
>> The cycle->new_log, instead, have:
>> log->name: /usr/local/nginx/logs/error.log, log->fd: -1
>>
>>
>> It seems that the log object is not fully configured, when module init
>> callbacks are called.
>
> I've just tested and looked through code - module init callbacks
> (init_module member of ngx_module_t structure) are called after
> full configuration has been initialized (including logs) and even
> debug works perfectly using cycle->log (once you have error_log
> ... debug; configured at top level).
>
>>From data you provide it looks like you in fact use create_conf
> or init_conf callbacks of ngx_core_module_t structure.
>
Yes.
> You still should be able to use ngx_log_error(cycle->log), though
> level is initialized to NGX_LOG_NOTICE by default (so it's minimum
> level which will be logged unless you are reconfiguring already
> running nginx).
>
Ah, my bad.
I was using NGX_LOG_INFO, instead of NGX_LOG_NOTICE!
Now notices are logged.
Module is now complete:
http://hg.mperillo.ath.cx/nginx/ngx_python_module/
It is a core Nginx module that embeds the CPython interpreter.
The future version of ngx_http_wsgi_module will require this module.
Thanks Manlio
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.10 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iEYEARECAAYFAkuqQewACgkQscQJ24LbaUSGmwCdFwTOW8ovwkQFT6kIoXl6O6w1
Zx8An1jN4IBVrIwxnG0yjvYcejI5v9Ip
=R0ob
-----END PGP SIGNATURE-----
_______________________________________________
nginx-devel mailing list
nginx-devel@nginx.org
http://nginx.org/mailman/listinfo/nginx-devel