Open
[FEAT-025] 结构化日志 #68
TTAdd on  May 8
TT
TTCollaborators
May 8 Create

优先级: Should Have
所属里程碑: M2 - 功能完善
预计工作量: 3 人天

你的功能请求是否与某个问题有关?请描述一下。
生产环境出现问题时,如果日志不规范、信息不全,排查问题会非常困难。需要统一的结构化日志方案。

请描述你希望的解决方案
实现结构化日志系统:

  1. 统一的日志格式(JSON),包含时间戳、日志级别、组件、Agent ID、消息内容等字段
  2. 支持多种日志级别:debug、info、warn、error
  3. 支持日志输出到文件和控制台
  4. 支持日志轮转,避免单个文件过大
  5. 提供统一的日志工具类,所有组件复用
  6. 敏感信息脱敏处理(如 API Key)

日志格式示例:

{
  "timestamp": "2026-05-07T10:00:00Z",
  "level": "INFO",
  "component": "agent-manager",
  "agent_id": "agent-uuid-xxx",
  "message": "Agent created successfully",
  "duration_ms": 8500
}

验收标准:

依赖:

  • 无

请描述你考虑过的其他替代方案

  • 集成 ELK/Loki: M3 以后再考虑,第一阶段先打好日志基础

附加背景
可观测性的基础。

likedislike
openeuler-ci-botopeneuler-ci-botCollaborators
May 8 Added label: sig/sig-intelligence
openeuler-ci-bot
openeuler-ci-botCollaborators
May 8 Comments:

Welcome To openEuler Community

Hey @ftboy , thanks for your contribution to the community.

Bot Usage Manual

I'm the Bot here serving you. You can find the instructions on how to interact with me at Here . That means you can comment below every pull request or issue to trigger Bot Commands.

Contact Guide

If you have any questions, please contact the SIG: sig-intelligence ,
and any of the maintainers: @fromhsc, @gogoxiaoxiao, @huzhengce, @kaitiandu, @liumiao27, @lyhu, @wqianli ,
and any of the committers: @ftboy, @lipingEmmaSiguyi, @randy1568 .

likedislike