diff --git a/pkg/fileutils/fileutils_unix.go b/pkg/fileutils/fileutils_unix.go index f782b4266a..ab8e03a9a0 100644 --- a/pkg/fileutils/fileutils_unix.go +++ b/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) }