nicetoolbox.utils.logging_utils.setup_logging

nicetoolbox.utils.logging_utils.setup_logging(log_path: str, level=10) None[source]

Start logger.

Parameters:
  • log_path (str) – The path to the log file.

  • level (int, optional) –

    Determines from which level the logger will record the messages. For instance, when the level is set as logging.INFO, the messages with a severity below INFO (i.e. DEBUG) will be ignored. The possible levels are:

    • logging.DEBUG: Detailed information, typically of interest only when

    diagnosing problems. - logging.INFO: Confirmation that things are working as expected. - logging.WARNING: An indication that something unexpected happened, or indicative of some problem in the near future (e.g. ‘disk space low’).

    The software is still working as expected.

    • logging.ERROR: Due to a more serious problem, the software has not

    been able to perform some function. - logging.CRITICAL: A serious error, indicating that the program itself may be unable to continue running.

Returns:

None