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

一个通过Git历史记录和兴趣度恢复功能日志级别的工具

A Tool for Rejuvenating Feature Logging Levels via Git Histories and Degree of Interest

Yiming Tang, Allan Spektor, Raffi Khatchadourian, Mehdi Bagherzadeh

摘要:

日志记录是重要的编程实践。由于现代软件应用程序的高度事务性,每天都会生成大量日志,这可能会使开发人员不堪重负。日志记录信息过载对软件应用程序可能是危险的。使用日志级别,开发人员可以打印有用的信息,同时在软件运行时隐藏详细的日志。随着软件的发展,与周围软件功能实现相关联的日志记录语句的日志级别也可能需要改变。维护日志级别需要大量的手动工作。在本文中,我们展示了一种自动化的方法,可以通过匹配开发人员对周围功能的兴趣水平来恢复功能日志级别。该方法是作为一个开源Eclipse插件实现的,使用两个外部插件(JGit和Mylyn)。它在18个开源Java项目上进行了测试,这些项目包含约300万行代码和约4K条日志语句。我们的工具成功地分析了99.22%的日志语句,将日志级别分布增加了约20%,并在错误修复上下文中增加了日志的关注度约83%。有关详细信息,感兴趣的读者可以观看我们的演示视频(www.youtube.com/watch? v=qIULoAXoDv4)。

英文摘要:

Logging is a significant programming practice. Due to the highly transactional nature of modern software applications, massive amount of logs are generated every day, which may overwhelm developers. Logging information overload can be dangerous to software applications. Using log levels, developers can print the useful information while hiding the verbose logs during software runtime. As software evolves, the log levels of logging statements associated with the surrounding software feature implementation may also need to be altered. Maintaining log levels necessitates a significant amount of manual effort. In this paper, we demonstrate an automated approach that can rejuvenate feature log levels by matching the interest level of developers in the surrounding features. The approach is implemented as an open-source Eclipse plugin, using two external plug-ins (JGit and Mylyn). It was tested on 18 open-source Java projects consisting of ~3 million lines of code and ~4K log statements. Our tool successfully analyzes 99.22% of logging statements, increases log level distributions by ~20%, and increases the focus of logs in bug fix contexts ~83% of the time. For further details, interested readers can watch our demonstration video (https://www.youtube.com/watch?v=qIULoAXoDv4).

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

↑