lumber
lumber copied to clipboard
Exit on Fatal
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
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.
Would be great, thx.
flag
does something similar: http://golang.org/pkg/flag/#ErrorHandling