Lines Matching refs:access_log

21     nxt_router_access_log_t   *access_log;  member
26 nxt_http_request_t *r, nxt_router_access_log_t *access_log,
68 nxt_router_access_log_t *access_log; in nxt_router_access_log_create() local
93 access_log = router->access_log; in nxt_router_access_log_create()
95 if (access_log != NULL && nxt_strstr_eq(&alcf.path, &access_log->path)) { in nxt_router_access_log_create()
96 nxt_router_access_log_use(&router->lock, access_log); in nxt_router_access_log_create()
99 access_log = nxt_malloc(sizeof(nxt_router_access_log_t) in nxt_router_access_log_create()
101 if (access_log == NULL) { in nxt_router_access_log_create()
106 access_log->fd = -1; in nxt_router_access_log_create()
107 access_log->handler = &nxt_router_access_log_writer; in nxt_router_access_log_create()
108 access_log->count = 1; in nxt_router_access_log_create()
110 access_log->path.length = alcf.path.length; in nxt_router_access_log_create()
111 access_log->path.start = (u_char *) access_log in nxt_router_access_log_create()
114 nxt_memcpy(access_log->path.start, alcf.path.start, alcf.path.length); in nxt_router_access_log_create()
134 rtcf->access_log = access_log; in nxt_router_access_log_create()
143 nxt_router_access_log_t *access_log, nxt_var_t *format) in nxt_router_access_log_writer() argument
153 ctx->access_log = access_log; in nxt_router_access_log_writer()
183 nxt_fd_write(ctx->access_log->fd, ctx->text.start, ctx->text.length); in nxt_router_access_log_write_ready()
204 nxt_router_access_log_t *access_log; in nxt_router_access_log_open() local
206 access_log = tmcf->router_conf->access_log; in nxt_router_access_log_open()
208 b = nxt_buf_mem_alloc(tmcf->mem_pool, access_log->path.length + 1, 0); in nxt_router_access_log_open()
215 nxt_buf_cpystr(b, &access_log->path); in nxt_router_access_log_open()
251 nxt_router_access_log_t *access_log; in nxt_router_access_log_ready() local
255 access_log = tmcf->router_conf->access_log; in nxt_router_access_log_ready()
257 access_log->fd = msg->fd[0]; in nxt_router_access_log_ready()
278 nxt_router_access_log_t *access_log) in nxt_router_access_log_use() argument
280 if (access_log == NULL) { in nxt_router_access_log_use()
286 access_log->count++; in nxt_router_access_log_use()
294 nxt_router_access_log_t *access_log) in nxt_router_access_log_release() argument
296 if (access_log == NULL) { in nxt_router_access_log_release()
302 if (--access_log->count != 0) { in nxt_router_access_log_release()
303 access_log = NULL; in nxt_router_access_log_release()
308 if (access_log != NULL) { in nxt_router_access_log_release()
310 if (access_log->fd != -1) { in nxt_router_access_log_release()
311 nxt_fd_close(access_log->fd); in nxt_router_access_log_release()
314 nxt_free(access_log); in nxt_router_access_log_release()
321 nxt_router_access_log_t *access_log; member
334 nxt_router_access_log_t *access_log; in nxt_router_access_log_reopen_handler() local
337 access_log = nxt_router->access_log; in nxt_router_access_log_reopen_handler()
339 if (access_log == NULL) { in nxt_router_access_log_reopen_handler()
354 reopen->access_log = access_log; in nxt_router_access_log_reopen_handler()
356 b = nxt_buf_mem_alloc(mp, access_log->path.length + 1, 0); in nxt_router_access_log_reopen_handler()
363 nxt_buf_cpystr(b, &access_log->path); in nxt_router_access_log_reopen_handler()
413 nxt_router_access_log_t *access_log; in nxt_router_access_log_reopen_ready() local
418 access_log = reopen->access_log; in nxt_router_access_log_reopen_ready()
420 if (access_log == nxt_router->access_log) { in nxt_router_access_log_reopen_ready()
422 if (nxt_slow_path(dup2(msg->fd[0], access_log->fd) == -1)) { in nxt_router_access_log_reopen_ready()
424 msg->fd[0], access_log->fd, nxt_errno); in nxt_router_access_log_reopen_ready()