mirror of
https://github.com/caddyserver/caddy.git
synced 2025-06-05 03:34:41 +08:00
v2: 'log' directive for Caddyfile, and debug mode (#3052)
* httpcaddyfile: Begin implementing log directive, and debug mode For now, debug mode just sets the log level for all logs to DEBUG (unless a level is specified explicitly). * httpcaddyfile: Finish 'log' directive Also rename StringEncoder -> SingleFieldEncoder * Fix minor bug in replacer (when vals are empty)
This commit is contained in:
@ -67,6 +67,11 @@ func TestReplacer(t *testing.T) {
|
||||
input: `{{}`,
|
||||
expect: "",
|
||||
},
|
||||
{
|
||||
input: `{unknown}`,
|
||||
empty: "-",
|
||||
expect: "-",
|
||||
},
|
||||
} {
|
||||
actual := rep.ReplaceAll(tc.input, tc.empty)
|
||||
if actual != tc.expect {
|
||||
|
Reference in New Issue
Block a user