There should be a way to override the os.Exit() function call with a different exit handler.
zerolog.SetExitFunc(exit func(int) {})
// or even via a global
var ExitFunc = os.Exit()
This would allow people to do required cleanup such as closing a log file, or to write tests that call Fatal() and check that fatal was called.
There should be a way to override the os.Exit() function call with a different exit handler.
This would allow people to do required cleanup such as closing a log file, or to write tests that call
Fatal()and check that fatal was called.