mirror of
https://github.com/trustedsec/hate_crack.git
synced 2026-07-28 14:47:22 -07:00
fix: --debug flag now outputs HTTP requests to screen
Enable urllib3 debug logging when --debug is active so all requests made via the requests library are visible on stderr. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
78d3cc7f44
commit
8c1f3ca6d0
@@ -30,3 +30,9 @@ def setup_logging(logger: logging.Logger, hate_path: str, debug_mode: bool) -> N
|
||||
logging.Formatter("%(asctime)s %(levelname)s %(message)s")
|
||||
)
|
||||
logger.addHandler(stream_handler)
|
||||
# Show HTTP requests made by the requests/urllib3 library.
|
||||
debug_handler = logging.StreamHandler(sys.stderr)
|
||||
debug_handler.setFormatter(logging.Formatter("%(asctime)s %(levelname)s %(name)s %(message)s"))
|
||||
urllib3_logger = logging.getLogger("urllib3")
|
||||
urllib3_logger.setLevel(logging.DEBUG)
|
||||
urllib3_logger.addHandler(debug_handler)
|
||||
|
||||
Reference in New Issue
Block a user