Spaces:
Running
on
Zero
Running
on
Zero
surpressing httpx log
Browse files
app.py
CHANGED
@@ -4,6 +4,12 @@ import subprocess
|
|
4 |
import shutil
|
5 |
from pathlib import Path
|
6 |
import urllib.request
|
|
|
|
|
|
|
|
|
|
|
|
|
7 |
|
8 |
# Get the current directory
|
9 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|
|
|
4 |
import shutil
|
5 |
from pathlib import Path
|
6 |
import urllib.request
|
7 |
+
import logging
|
8 |
+
|
9 |
+
# Configure logging - Add this section to suppress httpx logs
|
10 |
+
logging.getLogger("httpx").setLevel(logging.WARNING) # Raise level to WARNING to suppress INFO logs
|
11 |
+
logging.getLogger("urllib3").setLevel(logging.WARNING) # Also suppress urllib3 logs which might be used
|
12 |
+
logging.getLogger("httpcore").setLevel(logging.WARNING) # httpcore is used by httpx
|
13 |
|
14 |
# Get the current directory
|
15 |
current_dir = os.path.dirname(os.path.abspath(__file__))
|