# How To Disable Logging From The Python Request Library?

You can change the [log level](https://betterstack.com/community/guides/logging/log-levels-explained/) of the logger taking care of these messages.
Setting the level to `WARNING` will remove the request messages and keep
warnings and errors:

```python
import logging

logging.getLogger("requests").setLevel(logging.WARNING)
logging.getLogger("urllib3").setLevel(logging.WARNING)
```


[info]
## 🔭 Want to centralize and monitor your python logs?
Go to [Better Stack](https://betterstack.com/logs/) and start your log management in 5 minutes.
[/info]


### In settings.py File

While using Django or other platforms, you can also change the logger in the
settings provided by the framework. The following example is from Django:

```python
'urllib3': {
        'handlers': ['file'],
        'level': logging.WARNING
    }
```

If you are new to logging in Django, feel free to read our [Django Logging guide](https://betterstack.com/community/guides/logging/how-to-start-logging-with-django/) to get started.

[ad-logs]