Browse Source

libcontainerd/supervisor: use correct logger

Don't call logrus directly, but use the logger that was set.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 years ago
parent
commit
1d2a669445
1 changed files with 3 additions and 5 deletions
  1. 3 5
      libcontainerd/supervisor/remote_daemon.go

+ 3 - 5
libcontainerd/supervisor/remote_daemon.go

@@ -161,8 +161,7 @@ func (r *remote) startContainerd() error {
 
 
 	if pid != -1 {
 	if pid != -1 {
 		r.daemonPid = pid
 		r.daemonPid = pid
-		logrus.WithField("pid", pid).
-			Infof("libcontainerd: %s is still running", binaryName)
+		r.logger.WithField("pid", pid).Infof("%s is still running", binaryName)
 		return nil
 		return nil
 	}
 	}
 
 
@@ -210,8 +209,7 @@ func (r *remote) startContainerd() error {
 		return errors.Wrap(err, "libcontainerd: failed to save daemon pid to disk")
 		return errors.Wrap(err, "libcontainerd: failed to save daemon pid to disk")
 	}
 	}
 
 
-	logrus.WithField("pid", r.daemonPid).
-		Infof("libcontainerd: started new %s process", binaryName)
+	r.logger.WithField("pid", r.daemonPid).Infof("started new %s process", binaryName)
 
 
 	return nil
 	return nil
 }
 }
@@ -285,7 +283,7 @@ func (r *remote) monitorDaemon(ctx context.Context) {
 				delay = 100 * time.Millisecond
 				delay = 100 * time.Millisecond
 				continue
 				continue
 			}
 			}
-			logrus.WithField("address", r.GRPC.Address).Debug("Created containerd monitoring client")
+			r.logger.WithField("address", r.GRPC.Address).Debug("created containerd monitoring client")
 		}
 		}
 
 
 		if client != nil {
 		if client != nil {