dicogis.utils.journalizer module

Log management.

Author: Julien Moura

See: https://docs.python.org/fr/3/howto/logging.html

class dicogis.utils.journalizer.LogManager(console_level=30, file_level=20, label='DicoGIS', folder=None)

Bases: object

Manage logs: configuration, parsing, etc.

LOG_FORMAT = <logging.Formatter object>
__init__(console_level=30, file_level=20, label='DicoGIS', folder=None)

Initialize.

Parameters:
  • console_level (int) – log level for console handler. Defaults to logging.WARNING.

  • file_level (int) – log level for file handler. Defaults to logging.INFO.

  • label (str) – log file name. Defaults to package_name.

  • folder (Optional[Path]) – where to store log files. Defaults to None.

headers()

Log basic information before other message.

initial_logger_config()

Configure root logger.

Return type:

Logger

Returns:

configured logger