Logging -- used for system events and security breaches to describe 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.22% of logging statements, increases log level distributions by $\sim$20%, 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 和 Myly 上,该方法作为Eclipse IDE 插件加以实施,并在18 Java项目中以300万美元的代码线和$\sim4K的日志声明值。我们的工具成功地分析了99.22%的日志记录,增加了以$\simal reduring acluding press in prom press press room 20%, rodu the pain roal rodudududududududududu the prisl ridudududududududududududududuce.