Skip to content

_logging

_logging

Sandbox's default-path logging shorthand over the shared logger.

BestEffortLogger provides the implementation; this module binds it to the sandbox state log (_sandbox_log_path) and exposes the module-level log_debug / log_warning / warn_user shorthand that in-tree call sites use.

log_debug(message)

Append a DEBUG line to the sandbox's default log.

Source code in src/terok_sandbox/_util/_logging.py
def log_debug(message: str) -> None:
    """Append a DEBUG line to the sandbox's default log."""
    _default_logger.debug(message)

log_warning(message)

Append a WARNING line to the sandbox's default log.

Source code in src/terok_sandbox/_util/_logging.py
def log_warning(message: str) -> None:
    """Append a WARNING line to the sandbox's default log."""
    _default_logger.warning(message)

warn_user(component, message)

Print a structured warning to stderr and log it to the sandbox's default log.

Source code in src/terok_sandbox/_util/_logging.py
def warn_user(component: str, message: str) -> None:
    """Print a structured warning to stderr and log it to the sandbox's default log."""
    _default_logger.warn_user(component, message)