gwkokab.analysis.utils.logger ============================= .. py:module:: gwkokab.analysis.utils.logger Functions --------- .. autoapisummary:: gwkokab.analysis.utils.logger.custom_format gwkokab.analysis.utils.logger.log_device_info gwkokab.analysis.utils.logger.log_gwkokab_info gwkokab.analysis.utils.logger.log_info gwkokab.analysis.utils.logger.set_log_level gwkokab.analysis.utils.logger.time_now Module Contents --------------- .. py:function:: custom_format(record, *, show_path: bool = False) -> str Custom log format function for Loguru logger. :param record: Record dictionary. :type record: Record :returns: Formatted log string. :rtype: str .. py:function:: log_device_info() -> None Prints the device information. .. py:function:: log_gwkokab_info() -> None Prints the GWKokab version and the Python version. .. py:function:: log_info(start: bool = False) -> None Log the information about the package and the device information. :param start: If True, log the start message, by default False :type start: bool, optional .. py:function:: 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'. .. py:function:: time_now() -> str Get the current time as a string in the format YYYYMMDDHHMMSS. :returns: The current time as a string. :rtype: str