:py:mod:`mlair.helpers.logger` ============================== .. py:module:: mlair.helpers.logger .. autoapi-nested-parse:: Logger class. Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: mlair.helpers.logger.Logger .. py:class:: Logger(log_path=None, level_file=logging.DEBUG, level_stream=logging.INFO) Basic logger class to unify all logging outputs. Logs are saved in local file and returned to std output. In default settings, logging level of file logger is DEBUG, logging level of stream logger is INFO. Class must be imported and initialised in starting script, all subscripts should log with logging.info(), debug, ... .. py:method:: setup_logging_path(path: str = None) :staticmethod: Check if given path exists and creates if not. If path is None, use path from main. The logging file is named like `logging_.log` where runtime=`%Y-%m-%d_%H-%M-%S` of current run. :param path: path to logfile :return: path of logfile .. py:method:: logger_console(self, level: int) Define a stream handler which writes messages of given level or higher to std out. :param level: logging level as integer, e.g. logging.DEBUG or 10 :return: defines stream handler