code: def get_logger(dataset):
      pathname = "./log/{}_{}.txt".format(
          dataset, time.strftime("%m-%d_%H-%M-%S")
      )
      logger = logging.getLogger()
      logger.setLevel(logging.INFO)
      formatter = logging.Formatter(
          "%(asctime)s - %(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
  
file_path: DeepKE/src/deepke/name_entity_re/standard/w2ner/utils.py
imports: import logging
  import pickle
  import time
  from collections import defaultdict, deque
label_desc: Use image node_id 1 for calling a global function with example usage: get_logger(dataset) and returns: logger