8000 docs: add debug logging example by thinkingserious · Pull Request #544 · twilio/twilio-python · GitHub
[go: up one dir, main page]

Skip to content

docs: add debug logging example #544

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

Merged
merged 8 commits into from
Oct 20, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
typo
  • Loading branch information
thinkingserious committed Oct 19, 2020
commit aef9b978e0a6416294dd39575431cf3085845450
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -140,15 +140,15 @@ message = client.messages.create(to="+12316851234", from_="+15555555555",
### Enable Debug Logging
There are two ways to enable debug logging in the default HTTP client. You can create an environment variable called `TWILIO_LOG_LEVEL` and set it to `debug` or you can set the `log_level` variable on the client as debug:
```python
include logging
import logging

account = "ACXXXXXXXXXXXXXXXXX"
token = "YYYYYYYYYYYYYYYYYY"
client = Client(account, token, log_level=logging.DEBUG)
```
You can also set the log_level variable on the client after constructing the Twilio client:
```python
include logging
import logging

client = Client(account, token)
client.log_level = logging.DEBUG;
Expand Down
0