@@ -16,29 +16,60 @@ http {
16
16
default_type application/octet-stream;
17
17
18
18
# Use a debug-oriented logging format.
19
- log_format debugging '$remote_addr - $remote_user [$time_local ] "$request " '
20
- '$status $body_bytes_sent '
21
- '"HOST: $host " "UPSTREAM: $upstream_addr " '
22
- '"UPSTREAM-STATUS: $upstream_status " '
23
- '"SSL-PROTO: $ssl_protocol " '
24
- '"CONNECT-HOST: $connect_host " "CONNECT-PORT: $connect_port " "CONNECT-ADDR: $connect_addr " '
25
- '"PROXY-HOST: $proxy_host " "UPSTREAM-REDIRECT: $upstream_http_location " "CACHE-STATUS: $upstream_cache_status " '
26
- '"AUTH: $http_authorization " ' ;
27
-
28
- log_format debug_proxy 'CONNECTPROXY: $remote_addr - $remote_user [$time_local ] "$request " '
29
- '$status $body_bytes_sent '
30
- '"HOST: $host " "UPSTREAM: $upstream_addr " '
31
- '"UPSTREAM-STATUS: $upstream_status " '
32
- '"SSL-PROTO: $ssl_protocol " '
33
- '"CONNECT-HOST: $connect_host " "CONNECT-PORT: $connect_port " "CONNECT-ADDR: $connect_addr " "INTERCEPTED: $interceptedHost " '
34
- '"PROXY-HOST: $proxy_host " "UPSTREAM-REDIRECT: $upstream_http_location " "CACHE-STATUS: $upstream_cache_status " '
35
- '"AUTH: $http_authorization " ' ;
36
-
37
- log_format tweaked '$upstream_cache_status [$time_local ] "$uri " '
38
- '$status $body_bytes_sent '
39
- '"HOST:$host " '
40
- '"PROXY-HOST:$proxy_host " "UPSTREAM:$upstream_addr " ' ;
41
-
19
+ log_format debugging escape=json
20
+ '{'
21
+ '"access_time":"$time_local ",'
22
+ '"remote_addr":"$remote_addr ",'
23
+ '"remote_user":"$remote_user ",'
24
+ '"request":"$request ",'
25
+ '"status":"$status ",'
26
+ '"bytes_sent":"$body_bytes_sent ",'
27
+ '"host":"$host ",'
28
+ '"proxy_host":"$proxy_host ",'
29
+ '"upstream":"$upstream_addr "'
30
+ '"upstream_status":"$upstream_status ",'
31
+ '"ssl_protocol":"$ssl_protocol ",'
32
+ '"connect_host":"$connect_host ",'
33
+ '"connect_port":"$connect_port ",'
34
+ '"connect_addr":"$connect_addr ",'
35
+ '"upstream_http_location":"$upstream_http_location ",'
36
+ '"upstream_cache_status":"$upstream_cache_status ",'
37
+ '"http_authorization":"$http_authorization ",'
38
+ '}' ;
39
+
40
+ log_format debug_proxy escape=json
41
+ '{'
42
+ '"access_time":"$time_local ",'
43
+ '"remote_addr":"$remote_addr ",'
44
+ '"remote_user":"$remote_user ",'
45
+ '"request":"$request ",'
46
+ '"status":"$status ",'
47
+ '"bytes_sent":"$body_bytes_sent ",'
48
+ '"host":"$host ",'
49
+ '"proxy_host":"$proxy_host ",'
50
+ '"upstream":"$upstream_addr "'
51
+ '"upstream_status":"$upstream_status ",'
52
+ '"ssl_protocol":"$ssl_protocol ",'
53
+ '"connect_host":"$connect_host ",'
54
+ '"connect_port":"$connect_port ",'
55
+ '"connect_addr":"$connect_addr ",'
56
+ '"upstream_http_location":"$upstream_http_location ",'
57
+ '"upstream_cache_status":"$upstream_cache_status ",'
58
+ '"http_authorization":"$http_authorization ",'
59
+ '}' ;
60
+
61
+ log_format tweaked escape=json
62
+ '{'
63
+ '"access_time":"$time_local ",'
64
+ '"upstream_cache_status":"$upstream_cache_status ",'
65
+ '"uri":"$uri ",'
66
+ '"status":"$status ",'
67
+ '"bytes_sent":"$body_bytes_sent ",'
68
+ '"host":"$host ",'
69
+ '"proxy_host":"$proxy_host ",'
70
+ '"upstream":"$upstream_addr "'
71
+ '}' ;
72
+
42
73
keepalive_timeout 300 ;
43
74
gzip off ;
44
75
0 commit comments