configure_logging()

Configure logging for the smartclass package.

Usage

Source

configure_logging(
    level=logging.INFO,
    format_string=DEFAULT_FORMAT,
    date_format=DEFAULT_DATE_FORMAT,
    log_file=None,
    force=False
)

This should be called once at application startup. Subsequent calls will be ignored unless force=True.

Parameters

level: int | str = logging.INFO

Logging level (e.g., logging.DEBUG, logging.INFO, “DEBUG”, “INFO”). Default is logging.INFO.

format_string: str = DEFAULT_FORMAT

DEFAULT_FORMAT. Default is DEFAULT_FORMAT.

date_format: str = DEFAULT_DATE_FORMAT

DEFAULT_DATE_FORMAT. Default is DEFAULT_DATE_FORMAT.

log_file: Path | str | None = None

None. Default is None.

force: bool = False
False. Default is False.