Skip to content

bump sirupsen/logrus v1.4.1#3171

Merged
estesp merged 1 commit intocontainerd:masterfrom
thaJeztah:bump_logrus
Apr 3, 2019
Merged

bump sirupsen/logrus v1.4.1#3171
estesp merged 1 commit intocontainerd:masterfrom
thaJeztah:bump_logrus

Conversation

@thaJeztah
Copy link
Copy Markdown
Member

Full diff: sirupsen/logrus@v1.3.0...v1.4.1

Fixes:

  • Remove dependency on golang.org/x/crypto
  • Fix wrong method calls Logger.Print and Logger.Warningln
  • Update Entry.Logf to not do string formatting unless the log level is enabled
  • Fix infinite recursion on unknown Level.String()
  • Fix race condition in getCaller
  • Fix Entry.WithContext method to return a copy of the initial entry

New:

  • Add DeferExitHandler, similar to RegisterExitHandler but prepending the handler to the list of handlers (semantically like defer)
  • Add CallerPrettyfier to JSONFormatter and TextFormatter
  • Add Entry.WithContext() and Entry.Context, to set a context on entries to be used e.g. in hooks
  • Enhance TextFormatter to not print caller information when they are empty

Full diff: sirupsen/logrus@v1.3.0...v1.4.1

Fixes:

- Remove dependency on golang.org/x/crypto
- Fix wrong method calls Logger.Print and Logger.Warningln
- Update Entry.Logf to not do string formatting unless the log level is enabled
- Fix infinite recursion on unknown Level.String()
- Fix race condition in getCaller
- Fix Entry.WithContext method to return a copy of the initial entry

New:

- Add DeferExitHandler, similar to RegisterExitHandler but prepending the handler to the list of handlers (semantically like defer)
- Add CallerPrettyfier to JSONFormatter and `TextFormatter`
- Add Entry.WithContext() and Entry.Context, to set a context on entries to be used e.g. in hooks
- Enhance TextFormatter to not print caller information when they are empty

Signed-off-by: Sebastiaan van Stijn <[email protected]>
@dmcgowan
Copy link
Copy Markdown
Member

dmcgowan commented Apr 3, 2019

LGTM

Looks like some k8s stuff is still using that terminal check from golang.org/x/crypto

@thaJeztah
Copy link
Copy Markdown
Member Author

Looks like some k8s stuff is still using that terminal check from golang.org/x/crypto

Yes, I noticed it didn't get removed here (in moby it was removed). Possibly something to check if they really needed it as well. Just thought it was good to not require a crypto package in a logger 😅

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #3171 into master will decrease coverage by 4.07%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #3171      +/-   ##
==========================================
- Coverage   49.21%   45.14%   -4.08%     
==========================================
  Files         100      111      +11     
  Lines        9423    11971    +2548     
==========================================
+ Hits         4638     5404     +766     
- Misses       3960     5733    +1773     
- Partials      825      834       +9
Flag Coverage Δ
#linux 49.21% <ø> (ø) ⬆️
#windows 40.47% <ø> (?)
Impacted Files Coverage Δ
snapshots/native/native.go 43.04% <0%> (-9.99%) ⬇️
metadata/snapshot.go 45.8% <0%> (-8.96%) ⬇️
archive/tar.go 43.79% <0%> (-7.07%) ⬇️
metadata/containers.go 47.97% <0%> (-6.62%) ⬇️
content/local/writer.go 57.84% <0%> (-6.36%) ⬇️
content/local/store.go 48.51% <0%> (-5.03%) ⬇️
metadata/images.go 57.57% <0%> (-4.99%) ⬇️
archive/tar_opts.go 28.57% <0%> (-4.77%) ⬇️
archive/compression/compression.go 58.69% <0%> (-4.7%) ⬇️
metadata/buckets.go 56.33% <0%> (-4.6%) ⬇️
... and 61 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c9977b5...7c1365b. Read the comment docs.

Copy link
Copy Markdown
Member

@estesp estesp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@estesp estesp merged commit e16368d into containerd:master Apr 3, 2019
@thaJeztah thaJeztah deleted the bump_logrus branch April 3, 2019 21:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants