Skip to content
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

support different logging level or debug mode #191

Open
liuerfire opened this issue Aug 22, 2024 · 3 comments
Open

support different logging level or debug mode #191

liuerfire opened this issue Aug 22, 2024 · 3 comments

Comments

@liuerfire
Copy link
Contributor

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

@PaulSonOfLars
Copy link
Owner

PaulSonOfLars commented Aug 22, 2024

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
Copy link
Contributor Author

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:

@PaulSonOfLars
Copy link
Owner

My apologies, I've really dropped the ball on replying here!

Thank you for your explanation - I understand better now. I can see why you're asking for these things, and I think most of it ties back to #97. It'll be much easier to provide logging levels/interfaces once i adopt the new slog packages.

Once that's done, we can extend the dispatcher to print debug information on what to iterate over. Thank you for the suggestion!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants