gwkokab.analysis.utils.logger¶
Functions¶
|
Custom log format function for Loguru logger. |
|
Prints the device information. |
|
Prints the GWKokab version and the Python version. |
|
Log the information about the package and the device information. |
|
Set the log level for the logger. |
|
Get the current time as a string in the format YYYYMMDDHHMMSS. |
Module Contents¶
- gwkokab.analysis.utils.logger.custom_format(record, *, show_path: bool = False) str¶
Custom log format function for Loguru logger.
- Parameters:
record (Record) – Record dictionary.
- Returns:
Formatted log string.
- Return type:
- gwkokab.analysis.utils.logger.log_gwkokab_info() None¶
Prints the GWKokab version and the Python version.
- gwkokab.analysis.utils.logger.log_info(start: bool = False) None¶
Log the information about the package and the device information.
- Parameters:
start (bool, optional) – If True, log the start message, by default False
- gwkokab.analysis.utils.logger.set_log_level() None¶
Set the log level for the logger.
The preset log level when initialising GWKokab is the value of the GWKOKAB_LOG_LEVEL environment variable, or ‘WARNING’ if the environment variable is unset.
Valid options of GWKOKAB_LOG_LEVEL are ‘TRACE’, ‘DEBUG’, ‘INFO’, ‘SUCCESS’, ‘WARNING’, ‘ERROR’, and ‘CRITICAL’.