code: def log_to_console(status=True, level=None):
      
  
      if status:
          if level is not None:
              LOGGER.setLevel(level)
  
          console_handler = logging.StreamHandler()
          # create formatter
          formatter = logging.Formatter('%(levelname)s-%(name)s: %(message)s')
          # add formatter to handler
          console_handler.setFormatter(formatter)
          LOGGER.addHandler(console_handler)
  
          LOGGER.info("pangaea %s", version())
  
      else:
          for handle in LOGGER.handlers:
              if type(handle).__name__ == 'StreamHandler':
                  LOGGER.removeHandler(handle)
docs: Log events to  the console.
  
      Args:
          status (bool, Optional, Default=True)
              whether logging to console should be turned on(True) or off(False)
          level (string, Optional, Default=None) :
              level of logging; whichever level is chosen all higher levels
              will be logged.
              See: https://docs.python.org/2/library/logging.html#levels