picogl.logger
log message
Attributes
Classes
Logger class |
Functions
Set up logging configuration |
|
|
get QC emoji etc |
|
Adds emoji decoration to a log message based on its content and log level. |
Module Contents
- picogl.logger.decorate_log_message(message: str, level: int) str[source]
Adds emoji decoration to a log message based on its content and log level.
- Parameters:
message – The original log message
level – The logging level
- Returns:
Decorated log message string
- class picogl.logger.Logger[source]
Logger class
- static error(message: str, exception: Exception | None = None, level: int = logging.ERROR, stacklevel: int = 4, silent: bool = False) None[source]
Log an error message, optionally with an exception.
- static warning(message: str, exception: Exception | None = None, level: int = logging.WARNING, stacklevel: int = 4, silent: bool = False) None[source]
Log an error message, optionally with an exception.
- static json(data: Any, silent: bool = False) None[source]
Log a JSON object or JSON string as a single compact line.
- static message(message: str, level: int = logging.INFO, stacklevel: int = 3, silent: bool = False) None[source]
Log a plain message with optional formatting.
- static parameter(message: str, parameter: Any, float_precision: int = 2, max_length: int = 300, level: int = logging.INFO, stacklevel: int = 4, silent: bool = False) None[source]
Log a structured message including the type and uniform_value of a parameter.
- static header_message(message: str, level: int = logging.INFO, silent: bool = False, stacklevel: int = 3) None[source]
Logs a visually distinct header message with separator lines and emojis.
- Parameters:
stacklevel – int
silent – bool whether or not to write to the log
message – The message to log.
level – Logging level (default: logging.INFO).