summaryrefslogtreecommitdiff
path: root/caddytest/integration/caddyfile_adapt/global_options_log_custom.txt
blob: b39cce9e3779fb3be8c9c56b57d5bb7bd969c129 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
{
	log custom-logger {
		format filter {
			wrap console
			fields {
				request>remote_ip ip_mask {
					ipv4 24
					ipv6 32
				}
			}
		}
	}
}
----------
{
	"logging": {
		"logs": {
			"custom-logger": {
				"encoder": {
					"fields": {
						"request\u003eremote_ip": {
							"filter": "ip_mask",
							"ipv4_cidr": 24,
							"ipv6_cidr": 32
						}
					},
					"format": "filter",
					"wrap": {
						"format": "console"
					}
				}
			}
		}
	}
}