text: import logging
  
  def get_logger(pathname):
      logger = logging.getLogger()
      logger.setLevel(logging.DEBUG)
      formatter = logging.Formatter("%(asctime)s - [line:%(lineno)d] - %(levelname)s: %(message)s",
                                    datefmt='%Y-%m-%d %H:%M:%S')
  
      file_handler = logging.FileHandler(pathname)
      file_handler.setLevel(logging.DEBUG)
      file_handler.setFormatter(formatter)
  
      stream_handler = logging.StreamHandler()
      stream_handler.setLevel(logging.DEBUG)
      stream_handler.setFormatter(formatter)
  
      logger.addHandler(file_handler)
      logger.addHandler(stream_handler)
  
      return logger
  
  
  