return back initially allowed level if we encounter allowed key (#2889)

Fixes #2868 where module=main setting overrides all others
This commit is contained in:
Anton Kaliaev
2018-11-26 08:34:22 +04:00
committed by Ethan Buchman
parent b12488b5f1
commit 98e442a8de
3 changed files with 41 additions and 7 deletions

View File

@@ -51,7 +51,7 @@ func TestParseLogLevel(t *testing.T) {
buf.Reset()
logger.With("module", "wire").Debug("Kingpin")
logger.With("module", "mempool").With("module", "wire").Debug("Kingpin")
if have := strings.TrimSpace(buf.String()); c.expectedLogLines[0] != have {
t.Errorf("\nwant '%s'\nhave '%s'\nlevel '%s'", c.expectedLogLines[0], have, c.lvl)
}