You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm currently converting all my projects from logrus to zerolog (thank you guys for the amazing library!) and I was wondering if it would be possible to add a dedicated Hook associated to Fatal call, something that would help cleanup things properly if a Fatal call happens.
Logrus has https://github.com/sirupsen/logrus/blob/master/alt_exit.go#L74 (DeferExitHandler) and it's very handy for when the Go program has CLI interface that manipulate the terminal in such way a cleanup is needed if the program exit for example.
I know I can do it with the Hook system already, but I feel like this special use-case would:
improve performances compared to setting-up a classic Hook
make sense to have a dedicated hook because of the nature of the Fatal call
be easier to use and setup overall for this kind of use-cases
What do you think?
The text was updated successfully, but these errors were encountered:
Hello!
I'm currently converting all my projects from logrus to zerolog (thank you guys for the amazing library!) and I was wondering if it would be possible to add a dedicated Hook associated to Fatal call, something that would help cleanup things properly if a Fatal call happens.
Logrus has https://github.com/sirupsen/logrus/blob/master/alt_exit.go#L74 (DeferExitHandler) and it's very handy for when the Go program has CLI interface that manipulate the terminal in such way a cleanup is needed if the program exit for example.
I know I can do it with the Hook system already, but I feel like this special use-case would:
What do you think?
The text was updated successfully, but these errors were encountered: