فهرست منبع

[24.0] pkg/fileutils: switch to use containerd log pkg

(very) partial backport of 74da6a6363d9d2991ea51ba44061a31a17b855cf
and ab35df454d0666ef1214168938f952cc74c1d659

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn 2 سال پیش
والد
کامیت
cd44aba8db
1فایلهای تغییر یافته به همراه3 افزوده شده و 3 حذف شده
  1. 3 3
      pkg/fileutils/fileutils_unix.go

+ 3 - 3
pkg/fileutils/fileutils_unix.go

@@ -1,20 +1,20 @@
 //go:build linux || freebsd
-// +build linux freebsd
 
 package fileutils // import "github.com/docker/docker/pkg/fileutils"
 
 import (
+	"context"
 	"fmt"
 	"os"
 
-	"github.com/sirupsen/logrus"
+	"github.com/containerd/containerd/log"
 )
 
 // GetTotalUsedFds Returns the number of used File Descriptors by
 // reading it via /proc filesystem.
 func GetTotalUsedFds() int {
 	if fds, err := os.ReadDir(fmt.Sprintf("/proc/%d/fd", os.Getpid())); err != nil {
-		logrus.Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err)
+		log.G(context.TODO()).Errorf("Error opening /proc/%d/fd: %s", os.Getpid(), err)
 	} else {
 		return len(fds)
 	}