docs: def log_setup(debug_bool):
      """Set up logging.
  
      We output only to stdout. Instead of also writing to a log file, redirect stdout to
      a log file when the script is executed from cron.
  
      """
  
      level = logging.DEBUG if debug_bool else logging.INFO
  
      logging.config.dictConfig(
          {
              "version": 1,
              "disable_existing_loggers": False,
              "formatters": {
                  "verbose": {
                      "format": "%(asctime)s %(levelname)-8s %(name)s %(module)s "
                      "%(process)d %(thread)d %(message)s",
                      "datefmt": "%Y-%m-%d %H:%M:%S",
                  }
              },
              "handlers": {
                  "console": {
                      "class": "logging.StreamHandler",
                      "formatter": "verbose",
                      "level": level,
                      "stream": "ext://sys.stdout",
                  }
              },
              "loggers": {
                  "": {
                      "handlers": ["console"],
                      "level": level,
                      "class": "logging.StreamHandler",
                  }
              },
          }
      )