From cd730ff87f0ab2bcac1a5172286265917a7907b1 Mon Sep 17 00:00:00 2001 From: Nick Neisen Date: Mon, 16 Oct 2023 12:26:01 -0600 Subject: [PATCH] Switch stat logging to debugf() (#259) --- core/imagefs_linux.go | 4 ++-- core/stats.go | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/core/imagefs_linux.go b/core/imagefs_linux.go index 68a91780e..25cd1d6e0 100644 --- a/core/imagefs_linux.go +++ b/core/imagefs_linux.go @@ -40,7 +40,7 @@ func (ds *dockerService) imageFsInfo() (*runtimeapi.ImageFsInfoResponse, error) } usedBytes := (stat.Blocks - stat.Bfree) * uint64(stat.Bsize) iNodesUsed := stat.Files - stat.Ffree - logrus.Infof("Filesystem usage containing '%s': usedBytes=%v, iNodesUsed=%v", ds.dockerRootDir, usedBytes, iNodesUsed) + logrus.Debugf("Filesystem usage containing '%s': usedBytes=%v, iNodesUsed=%v", ds.dockerRootDir, usedBytes, iNodesUsed) // compute total used bytes by docker images images, err := ds.client.ListImages(types.ImageListOptions{All: true, SharedSize: true}) @@ -61,7 +61,7 @@ func (ds *dockerService) imageFsInfo() (*runtimeapi.ImageFsInfoResponse, error) for k := range sharedSizeMap { totalImageSize += uint64(k) } - logrus.Infof("Total used bytes by docker images: %v", totalImageSize) + logrus.Debugf("Total used bytes by docker images: %v", totalImageSize) return &runtimeapi.ImageFsInfoResponse{ ImageFilesystems: []*runtimeapi.FilesystemUsage{ diff --git a/core/stats.go b/core/stats.go index d21518e75..fecd0161a 100644 --- a/core/stats.go +++ b/core/stats.go @@ -175,7 +175,6 @@ func (ds *dockerService) ListContainerStats( r *runtimeapi.ListContainerStatsRequest, ) (*runtimeapi.ListContainerStatsResponse, error) { start := time.Now() - logrus.Info("Begin ListContainerStats") containerStatsFilter := r.GetFilter() filter := &runtimeapi.ContainerFilter{} @@ -194,7 +193,7 @@ func (ds *dockerService) ListContainerStats( containers := res.Containers ds.containerStatsCache.clist <- containers numContainers := len(containers) - logrus.Infof("Number of pod containers: %v", numContainers) + logrus.Debugf("Number of pod containers: %v", numContainers) if numContainers == 0 { return &runtimeapi.ListContainerStatsResponse{}, nil } @@ -242,7 +241,7 @@ func (ds *dockerService) ListContainerStats( return nil, err } - logrus.Infof("End ListContainerStats. Number of stats:%v, Time taken: %v", len(results), time.Since(start)) + logrus.Debugf("Number of stats:%v, Time taken: %v", len(results), time.Since(start)) return &runtimeapi.ListContainerStatsResponse{Stats: results}, nil }