-
Notifications
You must be signed in to change notification settings - Fork 141
Save last_error on init and emit #29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
setup.py
Outdated
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
whoops, I'll resubmit in a sec without this change
|
@kiyoto - I just wanted to follow up on our earlier email discussion. Do you think this PR can be merged? |
|
🔔 - Any update on this? |
|
@yyuu and @kiyoto - The existing tests also fail in that case, but because error information was discarded, the failure was not detectable. I added comments to indicate this where appropriate to existing tests. I believe that this is therefore an important fix. In my opinion, it makes sense to take this increment of value right away. We can update all tests to work properly without a running fluentd instance in another PR. |
|
Hiding the connect or send error is crazy, this library needs to be fixed. Look how the ruby library returns a success or failure by bubbling up a true or false on the post() method here: This lib should ideally do the same, beside storing the error, a new event should have a post() method and that should return a true/false on success or not. That makes usage far more clear IMO. |
This patch is based on cabiad's patch. #29
|
I merged #59. |
Uses a threadlocal variable to store errors, which a user of this library can optionally access and act on after initializing the sender (initially connecting to the fluentd server) or emitting an event.
Also includes relevant tests.