commands: Truncate the error log on repeated config errors

This commit is contained in:
Bjørn Erik Pedersen 2018-10-26 17:02:53 +02:00
parent 40e99672b6
commit 1e9ac3dcc2
No known key found for this signature in database
GPG key ID: 330E6E2BD4859D8F

View file

@ -227,6 +227,11 @@ func (c *commandeer) loadConfig(mustHaveConfigFile, running bool) error {
c.DepsCfg = &deps.DepsCfg{} c.DepsCfg = &deps.DepsCfg{}
} }
if c.logger != nil {
// Truncate the error log if this is a reload.
c.logger.Reset()
}
cfg := c.DepsCfg cfg := c.DepsCfg
c.configured = false c.configured = false
cfg.Running = running cfg.Running = running