Merge branch 'refactor-api-server' into clear-text-before-insert

This commit is contained in:
yangdx
2025-02-21 14:57:11 +08:00
2 changed files with 10 additions and 5 deletions

View File

@@ -263,9 +263,8 @@ class LightRAG:
_storages_status: StoragesStatus = field(default=StoragesStatus.NOT_CREATED)
def __post_init__(self):
logger.setLevel(self.log_level)
os.makedirs(os.path.dirname(self.log_file_path), exist_ok=True)
set_logger(self.log_file_path)
set_logger(self.log_file_path, self.log_level)
logger.info(f"Logger initialized for working directory: {self.working_dir}")
if not os.path.exists(self.working_dir):