arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.18528cs.SE
收藏

通过多智能体框架实现端到端自动日志记录

AutoLogger: A Multi-Agent Framework for the End-to-End Automated Logging

The Chinese University of Hong Kong(香港中文大学);Singapore Management University(新加坡管理大学);Nankai University(南开大学)

Renyi Zhong, Yintong Huo, Wenwei Gu, Yichen Li, Michael R. Lyu

AI总结:

本文提出Autologger框架,通过多智能体系统实现端到端自动日志记录,提升日志生成质量与准确性。

摘要:

软件日志记录对于系统可观性至关重要,但开发人员面临成本高昂的过度记录和风险较高的不足记录的双重危机。现有的自动日志记录工具往往忽视了是否记录的基本决策,并且难以处理日志的复合性质。在本文中,我们提出了Autologger,一种新颖的混合框架,旨在解决完整的端到端日志记录管道。Autologger首先使用微调的分类器Judger,准确判断方法是否需要新的日志语句。如果需要记录,则激活多智能体系统。该系统包括专门的智能体:Locator专门用于确定在哪里记录,Generator专注于记录什么。这些智能体协同工作,利用我们设计的程序分析和检索工具。我们在三个成熟的开源项目的大语料库上评估了Autologger,与最先进的基线进行比较。我们的结果表明,Autologger在关键的是否记录决策上实现了96.63%的F1分数。在端到端设置中,Autologger在最强基线的基础上,通过LLM-as-a-judge评分提高了生成日志语句的整体质量16.13%。我们还证明了我们的框架具有通用性,能够一致提升各种基础LLM的性能。

英文摘要:

Software logging is critical for system observability, yet developers face a dual crisis of costly overlogging and risky underlogging. Existing automated logging tools often overlook the fundamental whether-to-log decision and struggle with the composite nature of logging. In this paper, we propose Autologger, a novel hybrid framework that addresses the complete the end-to-end logging pipeline. Autologger first employs a fine-tuned classifier, the Judger, to accurately determine if a method requires new logging statements. If logging is needed, a multi-agent system is activated. The system includes specialized agents: a Locator dedicated to determining where to log, and a Generator focused on what to log. These agents work together, utilizing our designed program analysis and retrieval tools. We evaluate Autologger on a large corpus from three mature open-source projects against state-of-the-art baselines. Our results show that Autologger achieves 96.63\% F1-score on the crucial whether-to-log decision. In an end-to-end setting, Autologger improves the overall quality of generated logging statements by 16.13\% over the strongest baseline, as measured by an LLM-as-a-judge score. We also demonstrate that our framework is generalizable, consistently boosting the performance of various backbone LLMs.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑