0
|
1
|
|
2 /*
|
|
3 * Copyright (C) Igor Sysoev
|
|
4 */
|
|
5
|
|
6
|
|
7 #ifndef _NGX_HTTP_LOG_HANDLER_H_INCLUDED_
|
|
8 #define _NGX_HTTP_LOG_HANDLER_H_INCLUDED_
|
|
9
|
|
10
|
|
11 #include <ngx_config.h>
|
|
12 #include <ngx_core.h>
|
|
13 #include <ngx_http.h>
|
|
14
|
|
15
|
|
16 typedef u_char *(*ngx_http_log_op_pt) (ngx_http_request_t *r, u_char *buf,
|
|
17 uintptr_t data);
|
|
18
|
|
19 #define NGX_HTTP_LOG_COPY_SHORT (ngx_http_log_op_pt) 0
|
|
20 #define NGX_HTTP_LOG_COPY_LONG (ngx_http_log_op_pt) -1
|
|
21
|
|
22 #define NGX_HTTP_LOG_ARG (u_int) -1
|
|
23
|
|
24
|
|
25 typedef struct {
|
|
26 size_t len;
|
|
27 ngx_http_log_op_pt op;
|
|
28 uintptr_t data;
|
|
29 } ngx_http_log_op_t;
|
|
30
|
|
31
|
|
32 typedef struct {
|
|
33 ngx_str_t name;
|
|
34 ngx_array_t *ops; /* array of ngx_http_log_op_t */
|
|
35 } ngx_http_log_fmt_t;
|
|
36
|
|
37
|
|
38 typedef struct {
|
|
39 ngx_str_t name;
|
|
40 size_t len;
|
|
41 ngx_http_log_op_pt op;
|
|
42 } ngx_http_log_op_name_t;
|
|
43
|
|
44
|
|
45 typedef struct {
|
|
46 ngx_array_t formats; /* array of ngx_http_log_fmt_t */
|
|
47 } ngx_http_log_main_conf_t;
|
|
48
|
|
49
|
|
50 typedef struct {
|
|
51 ngx_open_file_t *file;
|
|
52 ngx_array_t *ops; /* array of ngx_http_log_op_t */
|
|
53 } ngx_http_log_t;
|
|
54
|
|
55
|
|
56 typedef struct {
|
|
57 ngx_array_t *logs; /* array of ngx_http_log_t */
|
|
58 ngx_uint_t off; /* unsigned off:1 */
|
|
59 } ngx_http_log_loc_conf_t;
|
|
60
|
|
61
|
|
62 extern ngx_http_log_op_name_t ngx_http_log_fmt_ops[];
|
|
63
|
|
64
|
|
65 #endif /* _NGX_HTTP_LOG_HANDLER_H_INCLUDED_ */
|