mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-16 21:56:40 -05:00
36 lines
464 B
Text
36 lines
464 B
Text
|
{
|
||
|
log custom-logger {
|
||
|
format filter {
|
||
|
wrap console
|
||
|
fields {
|
||
|
request>remote_addr ip_mask {
|
||
|
ipv4 24
|
||
|
ipv6 32
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
----------
|
||
|
{
|
||
|
"logging": {
|
||
|
"logs": {
|
||
|
"custom-logger": {
|
||
|
"encoder": {
|
||
|
"fields": {
|
||
|
"request\u003eremote_addr": {
|
||
|
"filter": "ip_mask",
|
||
|
"ipv4_cidr": 24,
|
||
|
"ipv6_cidr": 32
|
||
|
}
|
||
|
},
|
||
|
"format": "filter",
|
||
|
"wrap": {
|
||
|
"format": "console"
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|