code: def init_console_logging(conf):
      
      # define a Handler which writes messages to the sys.stderr
      console = find_console_handler(logging.getLogger())
      if not console:
          console = logging.StreamHandler()
      logging_level = log_level(conf)
      console.setLevel(logging_level)
  
      # set a format which is simpler for console use
      formatter = _get_debug_formatter(conf)
      # tell the handler to use this format
      console.setFormatter(formatter)
      # add the handler to the root logger
      logging.getLogger().addHandler(console)
      logging.getLogger().setLevel(logging_level)
      global LOG  # pylint: disable=W0603
      LOG = logging.getLogger(__name__)
docs: Log to console.