log icon indicating copy to clipboard operation
log copied to clipboard

Add a Flush() to the interface?

Open matthewmueller opened this issue 6 years ago • 1 comments

This would require some updates, but it would help for handlers like papertrail and ES to have the ability to buffer, with a defer log.Flush(). For ones that go to stderr, it could be a no-op.

matthewmueller avatar Sep 16 '17 12:09 matthewmueller

agreed! It could be optional as a separate interface too I suppose, or just io.Flusher, but the internal logger I use for Ping has a Flush() method haha so I'm down.

tj avatar Sep 16 '17 18:09 tj