We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Here's a small test to demonstrate:
package main import ( "fmt" "os" "github.com/rs/zerolog" "github.com/rs/zerolog/diode" ) func main() { w := diode.NewWriter(os.Stdout, 1000, 0, func(missed int) { fmt.Printf("Dropped %d messages\n", missed) }) log := zerolog.New(w) log.Print("this will print") log.Fatal().Msg("this will not") w.Close() }
https://play.golang.org/p/pYkYlBrde_7
The text was updated successfully, but these errors were encountered:
Fatal calls panic() internally, that won't give diode enough time to flush the buffer.
panic()
To work around this in my project I use logger.WithLevel(zerolog.FatalLevel).
logger.WithLevel(zerolog.FatalLevel)
Sorry, something went wrong.
FYI this is fixed in #634
No branches or pull requests
Here's a small test to demonstrate:
https://play.golang.org/p/pYkYlBrde_7
The text was updated successfully, but these errors were encountered: