diff options
Diffstat (limited to 'cmd/btrfs-rec/main.go')
-rw-r--r-- | cmd/btrfs-rec/main.go | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/cmd/btrfs-rec/main.go b/cmd/btrfs-rec/main.go index d4165bf..dc00dab 100644 --- a/cmd/btrfs-rec/main.go +++ b/cmd/btrfs-rec/main.go @@ -103,7 +103,9 @@ func main() { ctx := cmd.Context() logger := textui.NewLogger(os.Stderr, logLevelFlag.Level) ctx = dlog.WithLogger(ctx, logger) - ctx = dlog.WithField(ctx, "mem", new(textui.LiveMemUse)) + if logLevelFlag.Level >= dlog.LogLevelDebug { + ctx = dlog.WithField(ctx, "mem", new(textui.LiveMemUse)) + } dlog.SetFallbackLogger(logger.WithField("btrfs-progs.THIS_IS_A_BUG", true)) grp := dgroup.NewGroup(ctx, dgroup.GroupConfig{ |