configure_logging
- configure_logging(level: int | str = 20, format_string: str = '%(asctime)s - %(name)s - %(levelname)s - %(message)s', date_format: str = '%Y-%m-%d %H:%M:%S', log_file: Path | str | None = None, force: bool = False) None[source]
Configure logging for the smartclass package.
This should be called once at application startup. Subsequent calls will be ignored unless force=True.
- Parameters:
level – Logging level (e.g., logging.DEBUG, logging.INFO, “DEBUG”, “INFO”).
format_string – Format string for log messages.
date_format – Format string for timestamps.
log_file – Optional path to a log file. If provided, logs will be written to both console and file.
force – If True, reconfigure logging even if already configured.