hydromt.log.setuplog#

hydromt.log.setuplog(name: str = 'hydromt', path: str = None, log_level: int = 20, fmt: str = '%(asctime)s - %(name)s - %(module)s - %(levelname)s - %(message)s', append: bool = True) Logger[source]#

Set up the logging on sys.stdout and file if path is given.

Parameters:
  • name (str, optional) – logger name, by default “hydromt”

  • path (str, optional) – path to logfile, by default None

  • log_level (int, optional) – Log level [0-50], by default 20 (info)

  • fmt (str, optional) – log message formatter

  • append (bool, optional) – Whether to append (True) or overwrite (False) to a logfile at path, by default True

Returns:

_description_

Return type:

logging.Logger