Mercurial > hg > nginx
comparison src/stream/ngx_stream_log_module.c @ 6693:3908156a51fa
Stream: phases.
author | Roman Arutyunyan <arut@nginx.com> |
---|---|
date | Thu, 15 Sep 2016 14:55:54 +0300 |
parents | 0125b151c9a5 |
children | 0cf4e82e7c48 |
comparison
equal
deleted
inserted
replaced
6692:56fc55e32f23 | 6693:3908156a51fa |
---|---|
1462 | 1462 |
1463 | 1463 |
1464 static ngx_int_t | 1464 static ngx_int_t |
1465 ngx_stream_log_init(ngx_conf_t *cf) | 1465 ngx_stream_log_init(ngx_conf_t *cf) |
1466 { | 1466 { |
1467 ngx_stream_handler_pt *h; | |
1467 ngx_stream_core_main_conf_t *cmcf; | 1468 ngx_stream_core_main_conf_t *cmcf; |
1468 | 1469 |
1469 cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module); | 1470 cmcf = ngx_stream_conf_get_module_main_conf(cf, ngx_stream_core_module); |
1470 | 1471 |
1471 cmcf->access_log_handler = ngx_stream_log_handler; | 1472 h = ngx_array_push(&cmcf->phases[NGX_STREAM_LOG_PHASE].handlers); |
1473 if (h == NULL) { | |
1474 return NGX_ERROR; | |
1475 } | |
1476 | |
1477 *h = ngx_stream_log_handler; | |
1472 | 1478 |
1473 return NGX_OK; | 1479 return NGX_OK; |
1474 } | 1480 } |