alexandrevicenzi / go-sse

Server-Sent Events for Go
MIT License
172 stars 40 forks source link

Conditional logging #1

Closed AdminXVII closed 6 years ago

AdminXVII commented 6 years ago

While library outputs are welcomed during development, they are annoying and useless in production. Maybe conditional logging could be implemented to overcome this problem?

alexandrevicenzi commented 6 years ago

Fixed by #2

flowchartsman commented 6 years ago

Don't use the log-global logger. Allow clients to provide their own logger in the server options and only if nil should you default to system logger.

AdminXVII commented 6 years ago

proposed a new pull request