code: def config_logging(debug):
      
  
      if debug:
          logging.basicConfig(level=logging.DEBUG, format='%(asctime)s %(message)s')
          logging.debug("Debug mode activated")
      else:
          logging.basicConfig(level=logging.INFO, format='%(asctime)s %(message)s')
docs: Config logging level output output