feat(proxy_cli.py): support json logs on proxy

allow user to enable 'json logs' for proxy server
This commit is contained in:
Krrish Dholakia 2024-05-20 09:18:12 -07:00
parent 0016477d3b
commit 00d47f3d3b
4 changed files with 34 additions and 4 deletions

View file

@ -1,7 +1,7 @@
import logging
import logging, os
set_verbose = False
json_logs = False
json_logs = bool(os.getenv("JSON_LOGS", False))
# Create a handler for the logger (you may need to adapt this based on your needs)
handler = logging.StreamHandler()
handler.setLevel(logging.DEBUG)