summaryrefslogtreecommitdiff
path: root/vendor/github.com/sirupsen/logrus/entry.go
diff options
context:
space:
mode:
authorOpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com>2020-09-29 13:20:30 +0000
committerGitHub <noreply@github.com>2020-09-29 13:20:30 +0000
commit84dede4452d4f85ad6dacf2c66e00500685c24af (patch)
tree670e0208837a7acf0a8b53eda463b57e55d353d8 /vendor/github.com/sirupsen/logrus/entry.go
parent5cf865926ed62c8baa691f96e8fe5f585e077083 (diff)
parente6789cb3e8aaaa54cd80e953f730f358b861f167 (diff)
downloadpodman-84dede4452d4f85ad6dacf2c66e00500685c24af.tar.gz
podman-84dede4452d4f85ad6dacf2c66e00500685c24af.tar.bz2
podman-84dede4452d4f85ad6dacf2c66e00500685c24af.zip
Merge pull request #7819 from containers/dependabot/go_modules/github.com/sirupsen/logrus-1.7.0
Bump github.com/sirupsen/logrus from 1.6.0 to 1.7.0
Diffstat (limited to 'vendor/github.com/sirupsen/logrus/entry.go')
-rw-r--r--vendor/github.com/sirupsen/logrus/entry.go14
1 files changed, 5 insertions, 9 deletions
diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go
index f6e062a34..5a5cbfe7c 100644
--- a/vendor/github.com/sirupsen/logrus/entry.go
+++ b/vendor/github.com/sirupsen/logrus/entry.go
@@ -13,7 +13,6 @@ import (
)
var (
- bufferPool *sync.Pool
// qualified package name, cached at first use
logrusPackage string
@@ -31,12 +30,6 @@ const (
)
func init() {
- bufferPool = &sync.Pool{
- New: func() interface{} {
- return new(bytes.Buffer)
- },
- }
-
// start at the bottom of the stack before the package-name cache is primed
minimumCallerDepth = 1
}
@@ -243,9 +236,12 @@ func (entry Entry) log(level Level, msg string) {
entry.fireHooks()
- buffer = bufferPool.Get().(*bytes.Buffer)
+ buffer = getBuffer()
+ defer func() {
+ entry.Buffer = nil
+ putBuffer(buffer)
+ }()
buffer.Reset()
- defer bufferPool.Put(buffer)
entry.Buffer = buffer
entry.write()