archetypal.utils.log(message, level=None, name=None, filename=None, avoid_console=False, log_dir=None, verbose=False)[source]

Write a message to the log file and/or print to the the console.

  • message (str) – the content of the message to log

  • level (int) – one of the logger.level constants

  • name (str) – name of the logger

  • filename (str) – name of the log file

  • avoid_console (bool) – If True, don’t print to console for this message only

  • log_dir (str, optional) – directory of log file. Defaults to settings.log_folder

  • verbose – If True, settings.log_console is overridden.