daemon/logger/ring.go: log error not instance
Log the error returned from logdriver.Log() instead of the logdriver itself. Signed-off-by: Cody Roseborough <crrosebo@amazon.com> Upstream-commit: a1956b5623fad186ad39ae8aca998284003b0cd3 Component: engine
This commit is contained in:
@@ -93,7 +93,10 @@ func (r *RingLogger) Close() error {
|
||||
}
|
||||
|
||||
if err := r.l.Log(msg); err != nil {
|
||||
logrus.WithField("driver", r.l.Name()).WithField("container", r.logInfo.ContainerID).Errorf("Error writing log message: %v", r.l)
|
||||
logrus.WithField("driver", r.l.Name()).
|
||||
WithField("container", r.logInfo.ContainerID).
|
||||
WithError(err).
|
||||
Errorf("Error writing log message")
|
||||
logErr = true
|
||||
}
|
||||
}
|
||||
@@ -114,7 +117,10 @@ func (r *RingLogger) run() {
|
||||
return
|
||||
}
|
||||
if err := r.l.Log(msg); err != nil {
|
||||
logrus.WithField("driver", r.l.Name()).WithField("container", r.logInfo.ContainerID).Errorf("Error writing log message: %v", r.l)
|
||||
logrus.WithField("driver", r.l.Name()).
|
||||
WithField("container", r.logInfo.ContainerID).
|
||||
WithError(err).
|
||||
Errorf("Error writing log message")
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user