pysiral._logger =============== .. py:module:: pysiral._logger .. autoapi-nested-parse:: A small module to handle logging in pysiral. This module is intended to be the first module called in pysiral.__init__.py, so that the logger is set up before any other modules are imported. Classes ------- .. autoapisummary:: pysiral._logger.InterceptHandler Functions --------- .. autoapisummary:: pysiral._logger.get_duration pysiral._logger.logger_format pysiral._logger.logger_format_debug pysiral._logger.set_logger Module Contents --------------- .. py:class:: InterceptHandler(level=NOTSET) Bases: :py:obj:`logging.Handler` Handler instances dispatch logging events to specific destinations. The base handler class. Acts as a placeholder which defines the Handler interface. Handlers can optionally use Formatter instances to format records as desired. By default, no formatter is specified; in this case, the 'raw' message as determined by record.message is logged. .. py:method:: emit(record) Do whatever it takes to actually log the specified logging record. This version is intended to be implemented by subclasses and so raises a NotImplementedError. .. py:function:: get_duration(elapsed_seconds: int, fmt_str: str = '%H:%M:%S') -> str Get a formatted string representing the duration from a given number of elapsed seconds. .. py:function:: logger_format(record: Dict) -> str Formatter function for loguru (Normal mode :param record: :return: logger string .. py:function:: logger_format_debug(record: Dict) -> str .. py:function:: set_logger() -> None Set up the logger for pysiral.