You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/environment_variables.md
-64Lines changed: 0 additions & 64 deletions
Original file line number
Diff line number
Diff line change
@@ -8,70 +8,6 @@ Environment variables are used by default. To ignore environment variables, `tru
8
8
9
9
Here is a list of environment variables that HTTPX recognizes and what function they serve:
10
10
11
-
## `HTTPX_LOG_LEVEL`
12
-
13
-
Valid values: `debug`, `trace` (case-insensitive)
14
-
15
-
If set to `debug`, then HTTP requests will be logged to `stderr`. This is useful for general purpose reporting of network activity.
16
-
17
-
If set to `trace`, then low-level details about the execution of HTTP requests will be logged to `stderr`, in addition to debug log lines. This can help you debug issues and see what's exactly being sent over the wire and to which location.
18
-
19
-
Example:
20
-
21
-
```python
22
-
# test_script.py
23
-
import httpx
24
-
25
-
with httpx.Client() as client:
26
-
r = client.get("https://google.com")
27
-
```
28
-
29
-
Debug output:
30
-
31
-
```console
32
-
$ HTTPX_LOG_LEVEL=debug python test_script.py
33
-
DEBUG [2019-11-06 19:11:24] httpx._client - HTTP Request: GET https://google.com "HTTP/1.1 301 Moved Permanently"
If you need to inspect the internal behaviour of `httpx`, you can use Python's standard logging to output information about the underlying network behaviour.
Logging output includes information from both the high-level `httpx` logger, and the network-level `httpcore` logger, which can be configured seperately.
45
+
46
+
For handling more complex logging configurations you might want to use the dictionary configuration style...
The exact formatting of the debug logging may be subject to change across different versions of `httpx` and `httpcore`. If you need to rely on a particular format it is recommended that you pin installation of these packages to fixed versions.
0 commit comments