logging
Logging configuration for IRDL.
This module provides centralized logging setup for the irdl package using Rich.
-
class irdl.logging.LoggerForwarder(target_logger: Logger)
Bases: Handler
Forward log records to a target logger.
-
emit(record: LogRecord) → None
Forward log records to the target logger.
-
class irdl.logging.RichProgressBar(description: str, preset_total: int = 0)
Bases: object
Wrap rich.progress.Progress to satisfy the pooch progress bar interface.
Pooch expects an object with a total attribute and update, reset, and
close methods. This class provides that interface backed by a Rich progress bar.
-
close() → None
Fill to 100% and stop the progress display.
-
reset() → None
Reset the completed byte count to zero.
Called by pooch before the final fill.
-
property total: int
Total download size in bytes.
- Returns:
intTotal download size in bytes.
-
update(n: int) → None
Advance the progress bar by n bytes.
-
class irdl.logging.StdoutCapture(logger_instance: Logger = <Logger irdl (INFO)>)
Bases: object
Context manager to capture stdout and log it.
-
irdl.logging.configure_cli_logging() → Logger
Configure logging for CLI usage with Rich handler.