-
Notifications
You must be signed in to change notification settings - Fork 41
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
Log forwarder #113
Log forwarder #113
Conversation
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.
Hi. Thanks for your PR! I left a few smaller comments below. Additionally, Please also have a look at the failing pre-commit tests.
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.
Thanks for the updates! Just one comment, rest LGTm :)
@@ -0,0 +1 @@ | |||
python-telegram-bot>=20.0 |
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.
If you want to be on the safe side, you could use >=20.0,<22.0
, but this is okay for me, too
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.
I didn't put much thought into it, I just copied from another module, the log forwarder should work with any version of ptb
that has the same signature for send_message
, so >=20.0
is good.
Also, sorry for the sloppy first PR and thanks for the suggestions.
Thank you very much for the contribution :) |
Mh, unfortunately there seems to be a problem on python 3.8: https://github.com/python-telegram-bot/ptbcontrib/actions/runs/10455010888/job/28948996383. Not sure why it didn't show in the tests here … Could you kindly open a follow-up PR? |
Logging handler for python-telegram-bot
Extension to forward application logs to specific Telegram chats through a
logging.Handler
class.Usage
Initialize the log forwarder in your
on_startup
method: