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

Exit on Fatal #1

Open
zbindenren opened this issue Sep 4, 2013 · 3 comments
Open

Exit on Fatal #1

zbindenren opened this issue Sep 4, 2013 · 3 comments

Comments

@zbindenren
Copy link

Hi

I like your Logger, but what I do not understand is, why you didn't put an os.exit(1) when logging Fatal like the standard go logger?

Maybe it would also be great if this is configurable.

Here the doc of the standard go logger:
http://golang.org/pkg/log/#Logger.Fatalf

A panic log level would also be great.

BR, Rene

@jcelliott
Copy link
Owner

Lumber is only intended to output logs. Having the logger end the program execution (e.g. with os.Exit) might not be the best behavior for all use cases. This way users can log the fatal message and then do whatever cleanup or shutdown that they need. But I can see the value in having it reflect the standard log package, so maybe I will add that as a configurable option.

@zbindenren
Copy link
Author

Would be great, thx.

@beatgammit
Copy link

flag does something similar: http://golang.org/pkg/flag/#ErrorHandling

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

No branches or pull requests

3 participants