def GetLogger(self, base_path):
     """Get logger built from info.txt."""
     info_file = INFO_FILE % base_path
     if not os.path.exists(os.path.dirname(info_file)):
         os.makedirs(os.path.dirname(info_file))
     logger = utils.Log(info_file)
     return logger
  def GetLogger(self):
    """Get logger built from info.txt."""

    if not self.info_file:
      # self.info_file is expected to be set before calling this method
      return None

    if not os.path.exists(os.path.dirname(self.info_file)):
      os.makedirs(os.path.dirname(self.info_file))
    logger = utils.Log(self.info_file)
    return logger
Exemple #3
0
 def __init__(self):
     # self.log = utils.Log(f"{self.database_path}.log")
     self.log = utils.Log()
     self.is_in_critical_section = False