mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 22:23:48 +03:00
0d44e3ecba
* logging: Implement `extra_log` handler * Rename to `log_append` * Rename `skip_log` to `log_skip` --------- Co-authored-by: Matt Holt <mholt@users.noreply.github.com>
71 lines
1 KiB
Text
71 lines
1 KiB
Text
:80 {
|
|
log
|
|
|
|
vars foo foo
|
|
|
|
log_append const bar
|
|
log_append vars foo
|
|
log_append placeholder {path}
|
|
|
|
log_append /only-for-this-path secret value
|
|
}
|
|
----------
|
|
{
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":80"
|
|
],
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"foo": "foo",
|
|
"handler": "vars"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"match": [
|
|
{
|
|
"path": [
|
|
"/only-for-this-path"
|
|
]
|
|
}
|
|
],
|
|
"handle": [
|
|
{
|
|
"handler": "log_append",
|
|
"key": "secret",
|
|
"value": "value"
|
|
}
|
|
]
|
|
},
|
|
{
|
|
"handle": [
|
|
{
|
|
"handler": "log_append",
|
|
"key": "const",
|
|
"value": "bar"
|
|
},
|
|
{
|
|
"handler": "log_append",
|
|
"key": "vars",
|
|
"value": "foo"
|
|
},
|
|
{
|
|
"handler": "log_append",
|
|
"key": "placeholder",
|
|
"value": "{http.request.uri.path}"
|
|
}
|
|
]
|
|
}
|
|
],
|
|
"logs": {}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|