Skip to main content

hackagent.interfaces.cli.logging_setup

Rich console logging for the CLI and TUI.

The library never installs handlers; the command-line entry point calls :func:setup_package_logging once at startup.

setup_package_logging​

def setup_package_logging(
logger_name: str = "hackagent",
default_level_str: str = "WARNING") -> logging.Logger

Configures RichHandler for the specified logger if not already set.

suppress_noisy_libraries​

def suppress_noisy_libraries(*names: str) -> None

Silence chatty third-party loggers to WARNING.

This is opt-in so that applications embedding hackagent are not surprised by their own library loggers being muted.

Example:

>>> from hackagent.interfaces.cli.logging_setup import suppress_noisy_libraries >>> suppress_noisy_libraries("httpx", "litellm", "urllib3")