gemnasium / logrus-graylog-hook

Graylog hook for logrus
MIT License
87 stars 62 forks source link

Make logger synchronous by default #4

Closed gravis closed 8 years ago

gravis commented 8 years ago

closes #1

Since the messages are sent in a goroutine, the program won't wait for the last messages to be sent, resulting in lost logs. This change introduce a new NewAsyncGraylogHook func to preserve API compatibility. Users who want to get back the async behavior must now use the Flush() func.