#2058 - Fix up log file path

This commit is contained in:
Nick Todd
2023-11-28 14:12:01 +00:00
parent 2eeb896099
commit e63727fa3a
2 changed files with 10 additions and 6 deletions

View File

@@ -38,6 +38,7 @@ class _PrimaitePaths:
self.app_config_file_path = self.generate_app_config_file_path()
self.app_log_dir_path = self.generate_app_log_dir_path()
self.app_log_file_path = self.generate_app_log_file_path()
self.episode_steps_log_file_path = self.generate_episode_step_log_file_path()
def _get_dirs_properties(self) -> List[str]:
class_items = self.__class__.__dict__.items()
@@ -105,6 +106,10 @@ class _PrimaitePaths:
"""The PrimAITE app log file path."""
return self.app_log_dir_path / "primaite.log"
def generate_episode_step_log_file_path(self) -> Path:
"""The PrimAITE app episode step log file path."""
return self.app_log_dir_path / "epi_step.json"
def __repr__(self) -> str:
properties_str = ", ".join([f"{p}='{getattr(self, p)}'" for p in self._get_dirs_properties()])
return f"{self.__class__.__name__}({properties_str})"