cppitasc.logging
Logging functionality used by the pitasc runtime.
The log messages will be printed to the screen if not suppressed by the log level. Only messages with a priority equal to or higher than the log level will be printed.
Example
>>> from cppitasc import logging
>>> logging.set_log_level("warn")
>>> logging.info("This info does not show.")
>>> logging.error("Error is printed.")
[ ERROR ] [<TIMESTAMP>] Error is printed.
- cppitasc.logging.debug(msg: str) None
Prints a message with “debug” priority to the screen.
- Parameters:
msg (str) – Message to be printed.
- cppitasc.logging.error(msg: str) None
Prints a message with “error” priority to the screen.
- Parameters:
msg (str) – Message to be printed.
- cppitasc.logging.fatal(msg: str) None
Prints a message with “fatal” priority to the screen.
- Parameters:
msg (str) – Message to be printed.
- cppitasc.logging.info(msg: str) None
Prints a message with “info” priority to the screen.
- Parameters:
msg (str) – Message to be printed.
- cppitasc.logging.set_log_level(log_level: str) None
Sets the log level for all subsequent log commands.
- Parameters:
log_level (str) – Log level to be used. Possible values in sequence of rising priority are “debug”, “info”, “warn”, “eeror”, “fatal”.
- cppitasc.logging.warn(msg: str) None
Prints a message with “warn” priority to the screen.
- Parameters:
msg (str) – Message to be printed.