diff options
author | gVisor bot <gvisor-bot@google.com> | 2021-01-15 22:57:44 +0000 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2021-01-15 22:57:44 +0000 |
commit | b71d19fd293c7e95ff4d6b306eeb6d8db4edf0d2 (patch) | |
tree | da3d6fdb945ebbf46215836f0c5ecf5a07e05372 /pkg | |
parent | eebe9d4f8c1e75b76d4c84d81d005ef4ab01d137 (diff) | |
parent | 9db126eb65ada4b2233ccb85a0e9c402b7efc5de (diff) |
Merge release-20210112.0-32-g9db126eb6 (automated)
Diffstat (limited to 'pkg')
-rw-r--r-- | pkg/refsvfs2/refs_map.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/pkg/refsvfs2/refs_map.go b/pkg/refsvfs2/refs_map.go index 9fbc5466f..0472eca3f 100644 --- a/pkg/refsvfs2/refs_map.go +++ b/pkg/refsvfs2/refs_map.go @@ -109,8 +109,7 @@ func LogDecRef(obj CheckedObject, refs int64) { // obj.LogRefs() should be checked before calling logEvent, in order to avoid // calling any text processing needed to evaluate msg. func logEvent(obj CheckedObject, msg string) { - log.Infof("[%s %p] %s:", obj.RefType(), obj, msg) - log.Infof(refs_vfs1.FormatStack(refs_vfs1.RecordStack())) + log.Infof("[%s %p] %s:\n%s", obj.RefType(), obj, msg, refs_vfs1.FormatStack(refs_vfs1.RecordStack())) } // DoLeakCheck iterates through the live object map and logs a message for each @@ -122,10 +121,11 @@ func DoLeakCheck() { defer liveObjectsMu.Unlock() leaked := len(liveObjects) if leaked > 0 { - log.Warningf("Leak checking detected %d leaked objects:", leaked) + msg := fmt.Sprintf("Leak checking detected %d leaked objects:\n", leaked) for obj := range liveObjects { - log.Warningf(obj.LeakMessage()) + msg += obj.LeakMessage() + "\n" } + log.Warningf(msg) } } } |