Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit11b9733

Browse files
Add instructions for enabling debug logging in the Kubernetes Python client
1 parentbd32360 commit11b9733

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

‎README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -236,4 +236,20 @@ recreate it between api calls that use _stream_ and other api calls.
236236

237237
See more at[exec example](examples/pod_exec.py).
238238

239+
##Enabling Debug Logging
240+
241+
To enable debug logging in the Kubernetes Python client, follow these steps:
242+
243+
###1. Import the`logging` module
244+
245+
```python
246+
import logging
247+
248+
# Set the logging level to DEBUG
249+
logging.basicConfig(level=logging.DEBUG)
250+
251+
# To see the HTTP requests and responses sent to the Kubernetes API (for debugging network-related issues), configure the urllib3 logger:
252+
logging.getLogger("urllib3").setLevel(logging.DEBUG)
253+
```
254+
239255
**[⬆ back to top](#Installation)**

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp