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

Remove uses of Fatalf which causes the application to quit if a custom logger is provided such as Uber zap #214

Closed
wants to merge 1 commit into from

Conversation

stanimirivanovde
Copy link

Uber zap's logger does os.Exit() if Fatal() or Fatalf() is called. Since go-ping supports custom loggers and in my case I pass in Uber zap's logger this causes my entire application to exit. Removing Fatal() calls is safer. If we need to ensure this error is handled up the call chain we can panic() which is better since the code can recover from a panic. The code cannot recover from an os.Exit() call.

@SuperQ
Copy link
Contributor

SuperQ commented Jan 21, 2023

See #226

@SuperQ SuperQ closed this Jan 21, 2023
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.

2 participants