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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Log request data sended to Telegram API #1088

Closed
asafov opened this issue May 2, 2020 · 8 comments
Closed

Log request data sended to Telegram API #1088

asafov opened this issue May 2, 2020 · 8 comments

Comments

@asafov
Copy link

asafov commented May 2, 2020

馃帀 Feature Request

Summary

I think it will be good idea to log request data sended to telegram server in debug log.
Maybe at dedicated "Verbose" log.

@noplanman
Copy link
Member

Do you mean to output the $data values in the error log along with the HTTP response?

@asafov
Copy link
Author

asafov commented May 2, 2020

Yes

@noplanman
Copy link
Member

I like this idea, thanks for bringing it up. I'll prepare a PR for you to check out 馃憣

@noplanman
Copy link
Member

@asafov What do you think, regarding the PR?

@asafov
Copy link
Author

asafov commented May 2, 2020

Looks great. Fully as i wanted. Maybe add setter and getter? What do you think?

@jacklul
Copy link
Collaborator

jacklul commented May 2, 2020

Looks great. Fully as i wanted. Maybe add setter and getter? What do you think?

Since it's a static class it doesn't make sense, you can simply:

TelegramLog::$log_request_data = true;

and change this at any time on run-time.

@asafov
Copy link
Author

asafov commented May 2, 2020

OK. Merge.

@asafov
Copy link
Author

asafov commented May 3, 2020

I create PR for log response data too.

@asafov asafov closed this as completed May 9, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants