diff options
author | Zhidao HONG <z.hong@f5.com> | 2024-10-28 16:30:03 +0800 |
---|---|---|
committer | Zhidao HONG <z.hong@f5.com> | 2024-11-14 09:43:48 +0800 |
commit | a760e24a2c4e5f93703bb365b12807d8b1035cf5 (patch) | |
tree | 5c27dad02b27eb70523f060a98916c9c5ef57282 /src/nxt_router.h | |
parent | a92d8149e47334d23e8cd31c48e3f02030049e30 (diff) | |
download | unit-a760e24a2c4e5f93703bb365b12807d8b1035cf5.tar.gz unit-a760e24a2c4e5f93703bb365b12807d8b1035cf5.tar.bz2 |
http: Introduce nxt_router_access_log_format_t structure
This is a preparatory refactoring for upcoming JSON format support
in access log. We will extend format option to access object for
JSON support.
No functional changes.
Diffstat (limited to 'src/nxt_router.h')
-rw-r--r-- | src/nxt_router.h | 39 |
1 files changed, 20 insertions, 19 deletions
diff --git a/src/nxt_router.h b/src/nxt_router.h index 06c6bb32..e2c5b83b 100644 --- a/src/nxt_router.h +++ b/src/nxt_router.h @@ -16,12 +16,13 @@ typedef struct nxt_http_request_s nxt_http_request_t; #include <nxt_application.h> -typedef struct nxt_http_action_s nxt_http_action_t; -typedef struct nxt_http_routes_s nxt_http_routes_t; -typedef struct nxt_http_forward_s nxt_http_forward_t; -typedef struct nxt_upstream_s nxt_upstream_t; -typedef struct nxt_upstreams_s nxt_upstreams_t; -typedef struct nxt_router_access_log_s nxt_router_access_log_t; +typedef struct nxt_http_action_s nxt_http_action_t; +typedef struct nxt_http_routes_s nxt_http_routes_t; +typedef struct nxt_http_forward_s nxt_http_forward_t; +typedef struct nxt_upstream_s nxt_upstream_t; +typedef struct nxt_upstreams_s nxt_upstreams_t; +typedef struct nxt_router_access_log_s nxt_router_access_log_t; +typedef struct nxt_router_access_log_format_s nxt_router_access_log_format_t; #define NXT_HTTP_ACTION_ERROR ((nxt_http_action_t *) -1) @@ -39,22 +40,22 @@ typedef struct { typedef struct { - uint32_t count; - uint32_t threads; + uint32_t count; + uint32_t threads; - nxt_mp_t *mem_pool; - nxt_tstr_state_t *tstr_state; + nxt_mp_t *mem_pool; + nxt_tstr_state_t *tstr_state; - nxt_router_t *router; - nxt_http_routes_t *routes; - nxt_upstreams_t *upstreams; + nxt_router_t *router; + nxt_http_routes_t *routes; + nxt_upstreams_t *upstreams; - nxt_lvlhsh_t mtypes_hash; - nxt_lvlhsh_t apps_hash; + nxt_lvlhsh_t mtypes_hash; + nxt_lvlhsh_t apps_hash; - nxt_router_access_log_t *access_log; - nxt_tstr_t *log_format; - nxt_tstr_cond_t log_cond; + nxt_tstr_cond_t log_cond; + nxt_router_access_log_t *access_log; + nxt_router_access_log_format_t *log_format; } nxt_router_conf_t; @@ -235,7 +236,7 @@ typedef struct { struct nxt_router_access_log_s { void (*handler)(nxt_task_t *task, nxt_http_request_t *r, nxt_router_access_log_t *access_log, - nxt_tstr_t *format); + nxt_router_access_log_format_t *format); nxt_fd_t fd; nxt_str_t path; uint32_t count; |