# How To Log All Requests From The Python Request Library?

If you are new to logging in Python, please feel free to start with our [Introduction to Python logging](https://betterstack.com/community/guides/logging/how-to-start-logging-with-python/) to get started smoothly. Otherwise, here is how to log all requests from the python request library:

You need to use `urllib3` logger and set the log level to `DEBUG`:

```python
log = logging.getLogger('urllib3')

log.setLevel(logging.DEBUG)
```

To maximise the message you can get, set `HTTPConnection.debuglevel` to `1`:

```python
from http.client import HTTPConnection
HTTPConnection.debuglevel = 1
```

By using the additional method, that cannot be captured by `logging`, you need
to settle for console output.

If you would like to have more options when it comes to logging, you can explore third-party frameworks like Loguru. Here is our [Guide](https://betterstack.com/community/guides/logging/loguru/) for how to get started with this most popular framework for Python.

[ad-logs]