PaulSonOfLars / gotgbot

Autogenerated Go wrapper for the telegram API. Inspired by the python-telegram-bot library.
MIT License
478 stars 106 forks source link

support different logging level or debug mode #191

Open liuerfire opened 3 weeks ago

liuerfire commented 3 weeks ago

Sometimes we may need see what the raw response data returned by getUpdates is to debug 😄

PaulSonOfLars commented 3 weeks ago

Hey - I believe you should be able to do this with some botClient middlewares to intercept getUpdate API calls and log them. There are some examples in the middlewareBot sample (except that just changes some parameters rather than logging output)

Would that work for your usecase?

liuerfire commented 3 weeks ago

Yes, It does.

And I'm sorry I didn't express my meaning clearly😂. My original thought was adding more logs for easier debugging. Here the places where I think need logs: