Logging -- used for system events and security breaches to more informational yet essential aspects of software features -- is pervasive. Given the high transactionality of today's software, logging effectiveness can be reduced by information overload. Log levels help alleviate this problem by correlating a priority to logs that can be later filtered. As software evolves, however, levels of logs documenting surrounding feature implementations may also require modification as features once deemed important may have decreased in urgency and vice-versa. We present an automated approach that assists developers in evolving levels of such (feature) logs. The approach, based on mining Git histories and manipulating a degree of interest (DOI) model, transforms source code to revitalize feature log levels based on the "interestingness" of the surrounding code. Built upon JGit and Mylyn, the approach is implemented as an Eclipse IDE plug-in and evaluated on 18 Java projects with $\sim$3 million lines of code and $\sim$4K log statements. Our tool successfully analyzes 99.26% of logging statements, increases log level distributions by $\sim$20%, identifies logs manually modified with a recall of $\sim$80% and a level-direction match rate of $\sim$87%, and increases the focus of logs in bug fix contexts $\sim$83% of the time. Moreover, pull (patch) requests were integrated into large and popular open-source projects. The results indicate that the approach is promising in assisting developers in evolving feature log levels.
翻译:用于系统事件和安全故障的日志, 用于系统事件和安全故障, 以获取更多信息, 但软件特性的基本方面, 是非常普遍的。 鉴于今天软件的高度交易性, 记录的有效性可以通过信息超负荷来降低。 日志水平通过将优先级别与以后过滤的日志联系起来来帮助缓解这一问题。 但是, 随着软件的演变, 记录特征执行的日志水平也可能需要修改, 因为一旦认为重要时, 其特性可能会在紧迫性和反之亦然。 我们展示了一种自动方法, 协助开发者逐步形成这种( 速度) 日志。 基于开采 Git 历史和调控某种程度( DOI) 模式, 将源代码转换为根据周围代码的“ 兴趣” 来恢复功能日志水平。 在 JGit 和 Mylyn 上, 该方法作为Eclipse IDE 插件来实施, 并在18 Java 项目中以300万美元代码行和 $=sim 4K 日志对日志报表进行评估。 我们的工具成功地分析了99.26 %,, 将日志水平的分布分布分布分配为 $80 和直径 。