chore(log): 移除记忆系统日志中的表情符号

清理 `memory_manager` 和 `memory_system` 模块中的日志输出,移除了表情符号,使日志信息更加简洁和专业。
This commit is contained in:
minecraft1024a
2025-10-05 13:08:16 +08:00
committed by Windpicker-owo
parent 1c9c4884c6
commit d3e349893e
2 changed files with 8 additions and 11 deletions

View File

@@ -73,10 +73,10 @@ class MemoryManager:
global_memory_manager = self.memory_system global_memory_manager = self.memory_system
self.is_initialized = True self.is_initialized = True
logger.info(" 记忆系统初始化完成") logger.info(" 记忆系统初始化完成")
except Exception as e: except Exception as e:
logger.error(f"记忆系统初始化失败: {e}") logger.error(f"记忆系统初始化失败: {e}")
# 如果系统初始化失败,创建一个空的管理器避免系统崩溃 # 如果系统初始化失败,创建一个空的管理器避免系统崩溃
self.memory_system = None self.memory_system = None
self.is_initialized = True # 标记为已初始化但系统不可用 self.is_initialized = True # 标记为已初始化但系统不可用
@@ -471,7 +471,7 @@ class MemoryManager:
try: try:
if self.memory_system: if self.memory_system:
await self.memory_system.shutdown() await self.memory_system.shutdown()
logger.info(" 记忆系统已关闭") logger.info(" 记忆系统已关闭")
except Exception as e: except Exception as e:
logger.error(f"关闭记忆系统失败: {e}") logger.error(f"关闭记忆系统失败: {e}")

View File

@@ -162,7 +162,6 @@ class MemorySystem:
async def initialize(self): async def initialize(self):
"""异步初始化记忆系统""" """异步初始化记忆系统"""
try: try:
logger.info("正在初始化记忆系统...")
# 初始化LLM模型 # 初始化LLM模型
fallback_task = getattr(self.llm_model, "model_for_task", None) if self.llm_model else None fallback_task = getattr(self.llm_model, "model_for_task", None) if self.llm_model else None
@@ -269,10 +268,8 @@ class MemorySystem:
self.hippocampus_sampler = None self.hippocampus_sampler = None
# 统一存储已经自动加载数据,无需额外加载 # 统一存储已经自动加载数据,无需额外加载
logger.info("✅ 简化版记忆系统初始化完成")
self.status = MemorySystemStatus.READY self.status = MemorySystemStatus.READY
logger.info("✅ 记忆系统初始化完成")
except Exception as e: except Exception as e:
self.status = MemorySystemStatus.ERROR self.status = MemorySystemStatus.ERROR
@@ -1489,7 +1486,7 @@ class MemorySystem:
"""启动海马体采样""" """启动海马体采样"""
if self.hippocampus_sampler: if self.hippocampus_sampler:
asyncio.create_task(self.hippocampus_sampler.start_background_sampling()) asyncio.create_task(self.hippocampus_sampler.start_background_sampling())
logger.info("🚀 海马体后台采样已启动") logger.info("海马体后台采样已启动")
else: else:
logger.warning("海马体采样器未初始化,无法启动采样") logger.warning("海马体采样器未初始化,无法启动采样")
@@ -1497,7 +1494,7 @@ class MemorySystem:
"""停止海马体采样""" """停止海马体采样"""
if self.hippocampus_sampler: if self.hippocampus_sampler:
self.hippocampus_sampler.stop_background_sampling() self.hippocampus_sampler.stop_background_sampling()
logger.info("🛑 海马体后台采样已停止") logger.info("海马体后台采样已停止")
def get_system_stats(self) -> dict[str, Any]: def get_system_stats(self) -> dict[str, Any]:
"""获取系统统计信息""" """获取系统统计信息"""
@@ -1536,10 +1533,10 @@ class MemorySystem:
if self.unified_storage: if self.unified_storage:
self.unified_storage.cleanup() self.unified_storage.cleanup()
logger.info("简化记忆系统已关闭") logger.info("简化记忆系统已关闭")
except Exception as e: except Exception as e:
logger.error(f"记忆系统关闭失败: {e}", exc_info=True) logger.error(f"记忆系统关闭失败: {e}", exc_info=True)
async def _rebuild_vector_storage_if_needed(self): async def _rebuild_vector_storage_if_needed(self):
"""重建向量存储(如果需要)""" """重建向量存储(如果需要)"""
@@ -1590,7 +1587,7 @@ class MemorySystem:
logger.info(f"✅ 向量存储重建完成,最终向量数量: {final_count}") logger.info(f"✅ 向量存储重建完成,最终向量数量: {final_count}")
except Exception as e: except Exception as e:
logger.error(f"向量存储重建失败: {e}", exc_info=True) logger.error(f"向量存储重建失败: {e}", exc_info=True)
# 全局记忆系统实例 # 全局记忆系统实例