mirror of
https://github.com/caddyserver/caddy.git
synced 2024-12-27 22:23:48 +03:00
01d5568b20
* logging: Implement `add` encoder * Allow flatter config structure for `filter` & `add` * Rename to append * govulncheck was unhappy
63 lines
No EOL
777 B
Text
63 lines
No EOL
777 B
Text
{
|
|
log {
|
|
format append {
|
|
wrap json
|
|
fields {
|
|
wrap "foo"
|
|
}
|
|
env {env.EXAMPLE}
|
|
int 1
|
|
float 1.1
|
|
bool true
|
|
string "string"
|
|
}
|
|
}
|
|
}
|
|
|
|
:80 {
|
|
respond "Hello, World!"
|
|
}
|
|
----------
|
|
{
|
|
"logging": {
|
|
"logs": {
|
|
"default": {
|
|
"encoder": {
|
|
"fields": {
|
|
"bool": true,
|
|
"env": "{env.EXAMPLE}",
|
|
"float": 1.1,
|
|
"int": 1,
|
|
"string": "string",
|
|
"wrap": "foo"
|
|
},
|
|
"format": "append",
|
|
"wrap": {
|
|
"format": "json"
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
"apps": {
|
|
"http": {
|
|
"servers": {
|
|
"srv0": {
|
|
"listen": [
|
|
":80"
|
|
],
|
|
"routes": [
|
|
{
|
|
"handle": [
|
|
{
|
|
"body": "Hello, World!",
|
|
"handler": "static_response"
|
|
}
|
|
]
|
|
}
|
|
]
|
|
}
|
|
}
|
|
}
|
|
}
|
|
} |