only error log when err is not nil

This commit is contained in:
bergquist 2018-05-08 11:59:27 +02:00
parent b649358734
commit 65352dccc0

View File

@ -138,7 +138,7 @@ func (g *GrafanaServerImpl) Run() error {
err := service.Run(g.context)
// If error is not canceled then the service crashed
if err != context.Canceled {
if err != context.Canceled && err != nil {
g.log.Error("Stopped "+reflect.TypeOf(service).Elem().Name(), "reason", err)
} else {
g.log.Info("Stopped "+reflect.TypeOf(service).Elem().Name(), "reason", err)