code: def log_init(level):
      
      log = logging.getLogger()
      hdlr = logging.StreamHandler()
      formatter = logging.Formatter('%(asctime)s %(name)s %(levelname)s %(message)s')
      hdlr.setFormatter(formatter)
      log.addHandler(hdlr)
      log.setLevel(level)
docs: Set up a logger that catches all channels and logs it to stdout.
      
      This is used to set up logging when testing.