From 5d97522d18da39cd3f9dd309774a5ad2c51f4c51 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Tue, 25 Feb 2020 22:00:33 -0700 Subject: 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) --- replacer_test.go | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'replacer_test.go') diff --git a/replacer_test.go b/replacer_test.go index 42e9ee1..4b56194 100644 --- a/replacer_test.go +++ b/replacer_test.go @@ -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 { -- cgit v1.2.3