mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-05 07:24:08 +08:00
40 lines
543 B
Plaintext
40 lines
543 B
Plaintext
|
{
|
||
|
log custom-logger {
|
||
|
format filter {
|
||
|
wrap console
|
||
|
fields {
|
||
|
common_log delete
|
||
|
request>remote_addr ip_mask {
|
||
|
ipv4 24
|
||
|
ipv6 32
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
----------
|
||
|
{
|
||
|
"logging": {
|
||
|
"logs": {
|
||
|
"custom-logger": {
|
||
|
"encoder": {
|
||
|
"fields": {
|
||
|
"common_log": {
|
||
|
"filter": "delete"
|
||
|
},
|
||
|
"request\u003eremote_addr": {
|
||
|
"filter": "ip_mask",
|
||
|
"ipv4_cidr": 24,
|
||
|
"ipv6_cidr": 32
|
||
|
}
|
||
|
},
|
||
|
"format": "filter",
|
||
|
"wrap": {
|
||
|
"format": "console"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|