Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: panic in case NewContext is used to initialize logger with Fatal #22

Merged
merged 1 commit into from Mar 4, 2019

Conversation

rhnvrm
Copy link
Contributor

@rhnvrm rhnvrm commented Mar 1, 2019

Hey,

I missed adding ExitFn to NewContext() causing a panic.

Have added a patch to fix it along with a scoped exit function which checks if ExitFn is nil (since it is exposed) and calls os.Exit as a fallback.

Regards

@codecov-io
Copy link

codecov-io commented Mar 1, 2019

Codecov Report

Merging #22 into master will decrease coverage by 0.46%.
The diff coverage is 77.77%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master      #22      +/-   ##
==========================================
- Coverage     100%   99.53%   -0.47%     
==========================================
  Files           3        3              
  Lines         423      429       +6     
==========================================
+ Hits          423      427       +4     
- Misses          0        1       +1     
- Partials        0        1       +1
Impacted Files Coverage Δ
entry.go 100% <100%> (ø) ⬆️
logger.go 99.38% <75%> (-0.62%) ⬇️

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 83c106f...cb21af3. Read the comment docs.

@francoispqt
Copy link
Owner

Ok thanks for the quick reaction, let me review and maybe add a few tests.

@francoispqt francoispqt merged commit 060a273 into francoispqt:master Mar 4, 2019
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.

None yet

3 participants