evalphobia / logrus_sentry

sentry hook for logrus
MIT License
194 stars 78 forks source link

Add support for asynchronous logging #27

Closed flimzy closed 7 years ago

flimzy commented 7 years ago

This adds support for asynchronous logging, so that log attempts are not blocking. Further (and most important), this adds a Flush() method, which can be used to ensure that any queued log messages are sent.

This functionality is heavily influenced by the async operation of the logrus-graylog plugin.

Without this functionality, there is no way to ensure that all logs have been sent when the program exits, possibly leading to the final log(s) being lost when a program exits or crashes.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-4.1%) to 82.596% when pulling 722171549051facd4e8e105280ee1c53d0bd802f on flimzy:async into f1b872156e4e636f872e5f5db78a17f6f3aa77a2 on evalphobia:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-4.1%) to 82.596% when pulling 722171549051facd4e8e105280ee1c53d0bd802f on flimzy:async into f1b872156e4e636f872e5f5db78a17f6f3aa77a2 on evalphobia:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-4.1%) to 82.596% when pulling 722171549051facd4e8e105280ee1c53d0bd802f on flimzy:async into f1b872156e4e636f872e5f5db78a17f6f3aa77a2 on evalphobia:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-4.1%) to 82.596% when pulling 722171549051facd4e8e105280ee1c53d0bd802f on flimzy:async into f1b872156e4e636f872e5f5db78a17f6f3aa77a2 on evalphobia:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-4.1%) to 82.596% when pulling 722171549051facd4e8e105280ee1c53d0bd802f on flimzy:async into f1b872156e4e636f872e5f5db78a17f6f3aa77a2 on evalphobia:master.

evalphobia commented 7 years ago

Thanks! ✌️