diff options
author | Adin Scannell <ascannell@google.com> | 2020-02-25 12:22:09 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-25 12:25:38 -0800 |
commit | 6def8ea6ac601daa9256a31f818db9f7eb532168 (patch) | |
tree | 0a1263e442b9a3216aa954ee55490cf1c053c461 /pkg/sentry | |
parent | 98b693e61b37a62f7b29ce1cab8b4c4c54fa044e (diff) |
Fix nested logging.
PiperOrigin-RevId: 297175316
Diffstat (limited to 'pkg/sentry')
-rw-r--r-- | pkg/sentry/kernel/task_log.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/pkg/sentry/kernel/task_log.go b/pkg/sentry/kernel/task_log.go index 6d737d3e5..eeccaa197 100644 --- a/pkg/sentry/kernel/task_log.go +++ b/pkg/sentry/kernel/task_log.go @@ -32,21 +32,21 @@ const ( // Infof logs an formatted info message by calling log.Infof. func (t *Task) Infof(fmt string, v ...interface{}) { if log.IsLogging(log.Info) { - log.Infof(t.logPrefix.Load().(string)+fmt, v...) + log.InfofAtDepth(1, t.logPrefix.Load().(string)+fmt, v...) } } // Warningf logs a warning string by calling log.Warningf. func (t *Task) Warningf(fmt string, v ...interface{}) { if log.IsLogging(log.Warning) { - log.Warningf(t.logPrefix.Load().(string)+fmt, v...) + log.WarningfAtDepth(1, t.logPrefix.Load().(string)+fmt, v...) } } // Debugf creates a debug string that includes the task ID. func (t *Task) Debugf(fmt string, v ...interface{}) { if log.IsLogging(log.Debug) { - log.Debugf(t.logPrefix.Load().(string)+fmt, v...) + log.DebugfAtDepth(1, t.logPrefix.Load().(string)+fmt, v...) } } |