sdom.configure_logging#

sdom.configure_logging(level=20, log_file=None)[source]#

Configure the logging system with colored console output and optional file logging.

Sets up logging handlers with color-coded formatting for terminal output. Optionally writes logs to a file as well. Should be called once at the start of SDOM execution.

Parameters:
  • level (int, optional) – Logging level threshold (e.g., logging.INFO, logging.DEBUG). Defaults to logging.INFO.

  • log_file (str, optional) – Path to a file where logs should be written. If None, logs only to console. Defaults to None.

Returns:

None

Notes

The format includes timestamp and log level: ‘YYYY-MM-DD HH:MM:SS-new line-LEVEL - message’ Color formatting is applied via the ColorFormatter class using ANSI codes. Multiple calls will reconfigure the logging system.