From b00dfd3965f400956c5bb5b388e9d54ef98052e5 Mon Sep 17 00:00:00 2001 From: Matt Holt Date: Mon, 28 Oct 2019 14:39:37 -0600 Subject: v2: Logging! (#2831) * logging: Initial implementation * logging: More encoder formats, better defaults * logging: Fix repetition bug with FilterEncoder; add more presets * logging: DiscardWriter; delete or no-op logs that discard their output * logging: Add http.handlers.log module; enhance Replacer methods The Replacer interface has new methods to customize how to handle empty or unrecognized placeholders. Closes #2815. * logging: Overhaul HTTP logging, fix bugs, improve filtering, etc. * logging: General cleanup, begin transitioning to using new loggers * Fixes after merge conflict --- replacer_test.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'replacer_test.go') diff --git a/replacer_test.go b/replacer_test.go index a30a75d..435582b 100644 --- a/replacer_test.go +++ b/replacer_test.go @@ -85,7 +85,7 @@ func TestReplacerSet(t *testing.T) { } } -func TestReplacerReplaceAll(t *testing.T) { +func TestReplacerReplaceKnown(t *testing.T) { rep := replacer{ providers: []ReplacementFunc{ // split our possible vars to two functions (to test if both functions are called) @@ -148,7 +148,7 @@ func TestReplacerReplaceAll(t *testing.T) { expected: "val1 {nope} test-123 ", }, } { - actual := rep.ReplaceAll(tc.testInput, "EMPTY") + actual := rep.ReplaceKnown(tc.testInput, "EMPTY") // test if all are replaced as expected if actual != tc.expected { -- cgit v1.2.3