go-chi / httplog

Go HTTP request logger with structured logging capabilities built on "log/slog" package
MIT License
207 stars 42 forks source link

Set writer for logger #2

Closed ghost closed 1 year ago

ghost commented 4 years ago

I intend to use your module for our application. It was fine until I need to set the writer to os.Stdout. I can see the writer is set on config.go like below log.Logger = log.Output(zerolog.ConsoleWriter{Out: os.Stderr, TimeFormat: time.RFC3339}) Would you please show me the way to set it to os.Stdout? And I would be happy if I can configure the TimeFormat too.

Thank you.

arjunksofficial commented 3 years ago

I also need the same thing. Let me know if need helps from my side for same

jonny7 commented 3 years ago

I'd also like to be able to split stderr and stdout logs

pkieltyka commented 3 years ago

Yes, its possible but could use a minor PR

pkieltyka commented 1 year ago

Solved in v2