From 1e9ac3dcc21e8f78d3f0a0ba4f35f6c142dfa6bc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bj=C3=B8rn=20Erik=20Pedersen?= Date: Fri, 26 Oct 2018 17:02:53 +0200 Subject: [PATCH] commands: Truncate the error log on repeated config errors --- commands/commandeer.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/commands/commandeer.go b/commands/commandeer.go index 3d4d0ff1be1..545191cfe7f 100644 --- a/commands/commandeer.go +++ b/commands/commandeer.go @@ -227,6 +227,11 @@ func (c *commandeer) loadConfig(mustHaveConfigFile, running bool) error { c.DepsCfg = &deps.DepsCfg{} } + if c.logger != nil { + // Truncate the error log if this is a reload. + c.logger.Reset() + } + cfg := c.DepsCfg c.configured = false cfg.Running = running