update:重新规划私有文件的存储目录

This commit is contained in:
hrz
2025-02-16 10:37:43 +08:00
parent 3f19c518d3
commit ed7fea0b46
8 changed files with 17 additions and 13 deletions
+2 -1
View File
@@ -3,9 +3,10 @@ import sys
import os
def setup_logging(log_dir='tmp'):
def setup_logging(log_dir='tmp', data_dir='data'):
"""配置全局日志"""
os.makedirs(log_dir, exist_ok=True)
os.makedirs(data_dir, exist_ok=True)
logging.basicConfig(
level=logging.INFO,
+1 -1
View File
@@ -11,7 +11,7 @@ class PrivateConfig:
def __init__(self, device_id: str, default_config: Dict[str, Any]):
self.device_id = device_id
self.default_config = default_config
self.config_path = get_project_dir() + '.private_config.yaml'
self.config_path = get_project_dir() + 'data/.private_config.yaml'
self.logger = logging.getLogger(__name__)
self.private_config = {}