Skip to content

Commit 588dc3f

Browse files
committed
Remove debug logging
1 parent f339e78 commit 588dc3f

File tree

2 files changed

+0
-7
lines changed

2 files changed

+0
-7
lines changed

metric/system/cgroup/reader.go

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -362,7 +362,6 @@ func (r *Reader) readControllerList(cgroupsFile string) ([]string, error) {
362362
controllers := strings.Split(cgroupsFile, "\n")
363363
var cgpath string
364364
for _, controller := range controllers {
365-
logp.L().Infof("controller: %s", controller)
366365
if strings.Contains(controller, "0::/") {
367366
fields := strings.Split(controller, ":")
368367
cgpath = fields[2]
@@ -375,19 +374,14 @@ func (r *Reader) readControllerList(cgroupsFile string) ([]string, error) {
375374
cgpath = filepath.Clean(cgpath) // The path may have a relative prefix like "/../..`, which effectively is "/".
376375
cgFilePath := filepath.Join(r.cgroupMountpoints.V2Loc, cgpath, "cgroup.controllers")
377376
if cgroupNSStateFetch() && r.rootfsMountpoint.IsSet() {
378-
logp.L().Infof("a) V2Loc: %s, ContainerizedRootMount %s", r.cgroupMountpoints.V2Loc, r.cgroupMountpoints.ContainerizedRootMount)
379377
cgFilePath = filepath.Join(r.cgroupMountpoints.V2Loc, r.cgroupMountpoints.ContainerizedRootMount, cgpath, "cgroup.controllers")
380-
} else {
381-
logp.L().Infof("b) V2Loc: %s, ContainerizedRootMount %s", r.cgroupMountpoints.V2Loc, r.cgroupMountpoints.ContainerizedRootMount)
382378
}
383379

384-
logp.L().Infof("reading %s", cgFilePath)
385380
controllersRaw, err := os.ReadFile(cgFilePath)
386381
if err != nil {
387382
return nil, fmt.Errorf("error reading cgroup '%s': file %s: %w", cgpath, cgFilePath, err)
388383
}
389384

390-
logp.L().Infof("controllersRaw: %s", controllersRaw)
391385
if len(controllersRaw) == 0 {
392386
return []string{}, nil
393387
}

metric/system/cgroup/util.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,7 +304,6 @@ func isCgroupNSPrivate() bool {
304304
}
305305
// if we have a path of just "/" that means we're in our own private namespace
306306
// if it's something else, we're probably in a host namespace
307-
logp.L().Infof("isCgroupPathSlash(%s) = %v", string(raw), isCgroupPathSlash(raw))
308307
return isCgroupPathSlash(raw)
309308
}
310309

0 commit comments

Comments
 (0)