autosim.logging#
Logging helpers for simulator progress and verbosity settings.
- configure_logging(log_to_file=False, level='INFO')[source]#
Configure the logging system.
- Parameters:
log_to_file – If True, logs will be written to a file. If a string, logs will be written to the specified file.
level (str) – The verbosity level. Can be “critical”, “error”, “warning”, “info”, or “debug”. Defaults to “info”.
- get_configured_logger(log_level, progress_bar_attr='progress_bar')[source]#
Configure logger and progress bar flag consistently.
- Parameters:
log_level – The logging level to set. Can be “progress_bar”, “debug”, “info”, “warning”, “error”, or “critical”.
progress_bar_attr – The attribute to check for progress bar. If log_level is set to this value, the logger will be set to “error” level and progress_bar will be True. Defaults to “progress_bar”.
- Returns:
The configured logger and the progress bar flag.
- Return type: