diff options
author | Roman Arutyunyan <arut@nginx.com> | 2016-09-15 14:55:54 +0300 |
---|---|---|
committer | Roman Arutyunyan <arut@nginx.com> | 2016-09-15 14:55:54 +0300 |
commit | 05a455ff21aa7afd938bd45444e5d9c6d42b6c4c (patch) | |
tree | d05d36619a5d6fea63e48d039b65ca5fc3380dad /src/stream/ngx_stream_log_module.c | |
parent | 04b9434b1817def37eb55cd7f4360d1164678797 (diff) | |
download | nginx-05a455ff21aa7afd938bd45444e5d9c6d42b6c4c.tar.gz nginx-05a455ff21aa7afd938bd45444e5d9c6d42b6c4c.zip |
Stream: phases.
Diffstat (limited to 'src/stream/ngx_stream_log_module.c')
-rw-r--r-- | src/stream/ngx_stream_log_module.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/stream/ngx_stream_log_module.c b/src/stream/ngx_stream_log_module.c index 4affbdf78..26e6d2298 100644 --- a/src/stream/ngx_stream_log_module.c +++ b/src/stream/ngx_stream_log_module.c @@ -1464,11 +1464,17 @@ ngx_stream_log_open_file_cache(ngx_conf_t *cf, ngx_command_t *cmd, void *conf) static ngx_int_t ngx_stream_log_init(ngx_conf_t *cf) { + ngx_stream_handler_pt *h; ngx_stream_core_main_conf_t *cmcf; cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module); - cmcf->access_log_handler = ngx_stream_log_handler; + h = ngx_array_push(&cmcf->phases[NGX_STREAM_LOG_PHASE].handlers); + if (h == NULL) { + return NGX_ERROR; + } + + *h = ngx_stream_log_handler; return NGX_OK; } |