qrunch.common.errors.error_logging

Module for handling error logs.

Functions

enable_error_logging(log_file)

Enable error logging to the given file.

Classes

ErrorlogHandler

Class for handling error logs.

class ErrorlogHandler

Bases: object

Class for handling error logs.

__init__() None

Initialize the ErrorlogHandler.

Return type:

None

static __new__(cls) Self

Create the class, if it does not already exist.

Return type:

Self

add_error_log(error_log: str) None

Add an error log to the handler.

Parameters:

error_log (str) – The error log string to add.

Return type:

None

property error_logs: list[str]

Return the list of error logs.

property file_path: Path | None

Return the path to the error log file.

save_error_log_if_enabled() None

Save the error logs to a file if the path is set.

Return type:

None

enable_error_logging(log_file: Path) None

Enable error logging to the given file.

Parameters:

log_file (Path) – The path for the error log file.

Return type:

None