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

log.Fatal() not printing anything #622

Closed
1366613 opened this issue Nov 29, 2023 · 1 comment
Closed

log.Fatal() not printing anything #622

1366613 opened this issue Nov 29, 2023 · 1 comment

Comments

@1366613
Copy link

1366613 commented Nov 29, 2023

I'm not sure what's wrong with this code.

package main

import (
	"fmt"
	"github.com/rs/zerolog"
	"github.com/rs/zerolog/diode"
	"os"
	"time"
)

func main() {
	wr := diode.NewWriter(os.Stdout, 1000, 10*time.Millisecond, func(missed int) {
		fmt.Printf("Logger Dropped %d messages", missed)
	})
	log := zerolog.New(wr).With().Caller().Timestamp().Logger()
	log.Fatal().Msg("test")
	time.Sleep(10 * time.Second)
}
@gmbuell
Copy link
Contributor

gmbuell commented Jan 13, 2024

Fixed in #634

@rs rs closed this as completed Mar 2, 2024
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