mirror of
https://github.com/xinnan-tech/xiaozhi-esp32-server.git
synced 2026-07-26 00:53:54 +08:00
update:重新规划私有文件的存储目录
This commit is contained in:
+2
-1
@@ -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,
|
||||
|
||||
@@ -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 = {}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user