jobflow_remote.utils.log module#

Tools for logging.

class jobflow_remote.utils.log.CLIFormatter(log_exception_trace: bool = True, **kwargs)[source]#

Bases: Formatter

Initialize the formatter with specified format strings.

Initialize the formatter either with the specified format string, or a default as described above. Allow for specialized date formatting with the optional datefmt argument. If datefmt is omitted, you get an ISO8601-like (or RFC 3339-like) format.

Use a style parameter of ‘%’, ‘{’ or ‘$’ to specify that you want to use one of %-formatting, str.format() ({}) formatting or string.Template formatting in your format string.

Changed in version 3.2: Added the style parameter.

formatException(ei)[source]#

Format and return the specified exception information as a string.

This default implementation just uses traceback.print_exception()

jobflow_remote.utils.log.initialize_cli_logger(level: int = 30, full_exc_info: bool = True) None[source]#

Initialize the logger for the CLI based on rich.

Parameters:

level – The log level.

jobflow_remote.utils.log.initialize_remote_run_log(level: int = 20) None[source]#

Initialize the logger for the execution of the jobs.

Parameters:

level – The log level.

jobflow_remote.utils.log.initialize_runner_logger(log_folder: str | Path, level: int = 20, runner_id: str | None = None) None[source]#

Initialize the runner logger.

Parameters:

level – The log level.