diff options
author | OpenShift Merge Robot <openshift-merge-robot@users.noreply.github.com> | 2021-02-21 10:50:49 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-21 10:50:49 -0500 |
commit | 19e56616998de842cd4f576da6a0eca113347c7a (patch) | |
tree | 5ac6dc3515dbac2a4bcf260789f868366d865b9a /vendor/github.com/sirupsen/logrus/entry.go | |
parent | 9a43fb33f141331b25bedfed5fff62d95b3cbd12 (diff) | |
parent | d886cd9305325bf73ae7f8b59944a55dc1bf7f64 (diff) | |
download | podman-19e56616998de842cd4f576da6a0eca113347c7a.tar.gz podman-19e56616998de842cd4f576da6a0eca113347c7a.tar.bz2 podman-19e56616998de842cd4f576da6a0eca113347c7a.zip |
Merge pull request #9419 from containers/dependabot/go_modules/github.com/sirupsen/logrus-1.8.0
Bump github.com/sirupsen/logrus from 1.7.1 to 1.8.0
Diffstat (limited to 'vendor/github.com/sirupsen/logrus/entry.go')
-rw-r--r-- | vendor/github.com/sirupsen/logrus/entry.go | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/vendor/github.com/sirupsen/logrus/entry.go b/vendor/github.com/sirupsen/logrus/entry.go index e02e057e1..c968f6344 100644 --- a/vendor/github.com/sirupsen/logrus/entry.go +++ b/vendor/github.com/sirupsen/logrus/entry.go @@ -88,10 +88,6 @@ func (entry *Entry) Dup() *Entry { // Returns the bytes representation of this entry from the formatter. func (entry *Entry) Bytes() ([]byte, error) { - return entry.bytes_nolock() -} - -func (entry *Entry) bytes_nolock() ([]byte, error) { return entry.Logger.Formatter.Format(entry) } @@ -222,8 +218,6 @@ func (entry Entry) HasCaller() (has bool) { entry.Caller != nil } -// This function is not declared with a pointer value because otherwise -// race conditions will occur when using multiple goroutines func (entry *Entry) log(level Level, msg string) { var buffer *bytes.Buffer @@ -279,13 +273,11 @@ func (entry *Entry) write() { fmt.Fprintf(os.Stderr, "Failed to obtain reader, %v\n", err) return } - func() { - entry.Logger.mu.Lock() - defer entry.Logger.mu.Unlock() - if _, err := entry.Logger.Out.Write(serialized); err != nil { - fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) - } - }() + entry.Logger.mu.Lock() + defer entry.Logger.mu.Unlock() + if _, err := entry.Logger.Out.Write(serialized); err != nil { + fmt.Fprintf(os.Stderr, "Failed to write to log, %v\n", err) + } } func (entry *Entry) Log(level Level, args ...interface{}) { |