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
Unexpected behavior when using absl-py with python's native logging library #148
Comments
It depends on how your third_party python library is using native logging and how much control you have to customize its behavior.
Some possibilities:
Does this help? |
Thanks for the quick reply.
I don't think so. The third-party library I mentioned above is Qiling. Here is their code: https://github.com/qilingframework/qiling/blob/3bf8cfb06160df27d17d7072294d951189871d81/qiling/utils.py#L162. I'll use the method 2i temporarily. |
Btw, is there any way to remove the one without timestamp and keep the one with the timestamp? |
Based on 2i works, you have access to the logger, to remove the handlers: for handler in logger.handlers:
logger.removeHandler(handler) |
Great. Thanks. |
I am seeing unexpected behaviors when using absl-py with a python library that uses python's native logging library.
Here is a minimal reproduce script:
Here is the output from the above script:
The message is somehow duplicated, one with timestamp, and one without timestamp.
I don't have control on the third_party python library (that uses python's native logging library), so I cannot switch that library to use absl-py logging.
Is there anyway to fix or workaround the problem without updating the logging library in the third party python library?
The text was updated successfully, but these errors were encountered: