paperbot · PL 论文追踪

全部论文 待读 收藏

P2 Studying the use of Java logging utilities in the wild

Java 日志工具在真实世界中的使用研究
ICSE Proceedings of the ACM/IEEE 42nd International Conference on Software Engineering2020匹配度 1/10 · 该论文是Java日志工具使用的大规模实证研究,属于软件工程/开发者工具领域,与用户画像关注的静态分析、LLM/Agent、浮点程序分析和贝叶斯程序分析均无直接交集。引用 29 inbox
Boyuan Chen, Zhen Ming (Jack) Jiang
crossref: 2026-09-12

AI 速览

一句话:通过大规模实证研究揭示 Java 项目中日志工具(LU)的复杂使用模式、原因及工业界反馈。

软件日志被广泛用于调试、监控、安全合规与业务分析。以往研究多关注打印日志的代码,却很少考察日志工具(LU)本身的使用,尽管新的 LU 不断涌现。本文对 Java LU 的真实使用展开大规模实证研究:分析 GitHub 上 11,194 个项目中的 3,856 个 LU,并开展定性研究与对 13 名工业开发者的访谈。结果显示,大型项目日志工具使用模式复杂,75.8% 的大型项目实现了自有 LU,超过 50% 的项目至少使用三种 LU;使用多种 LU 的原因包括日志消息国际化、项目特定日志格式需求以及为导入包配置日志行为等。工业访谈表明这些发现对实际项目同样成立,有助于开发者更好地配置和管理日志行为。

问题
已有研究主要关注日志打印代码,缺乏对日志工具(LU)使用方式及其复杂模式的大规模理解。
方法
对 GitHub 上 11,194 个 Java 项目中的 3,856 个 LU 进行大规模实证分析,并结合定性研究与对 13 名工业开发者的访谈。
评估
通过使用模式统计、定性归纳和工业访谈验证发现,并分析复杂使用原因与开发者反馈。
原文摘要(Abstract)

Software logging is widely used in practice. Logs have been used for a variety of purposes like debugging, monitoring, security compliance, and business analytics. Instead of directly invoking the standard output functions, developers usually prefer to use logging utilities (LUs) (e.g., SLF4J), which provide additional functionalities like thread-safety and verbosity level support, to instrument their source code. Many of the previous research works on software logging are focused on the log printing code. There are very few works studying the use of LUs, although new LUs are constantly being introduced by companies and researchers. In this paper, we conducted a large-scale empirical study on the use of Java LUs in the wild. We analyzed the use of 3, 856 LUs from 11,194 projects in GitHub and found that many projects have complex usage patterns for LUs. For example, 75.8% of the large-sized projects have implemented their own LUs in their projects. More than 50% of these projects use at least three LUs. We conducted further qualitative studies to better understand and characterize the complex use of LUs. Our findings show that different LUs are used for a variety of reasons (e.g., internationalization of the log messages). Some projects develop their own LUs to satisfy project-specific logging needs (e.g., defining the logging format). Multiple uses of LUs in one project are pretty common for large and very largesized projects mainly for context like enabling and configuring the logging behavior for the imported packages. Interviewing with 13 industrial developers showed that our findings are also generally true for industrial projects and are considered as very helpful for them to better configure and manage the logging behavior for their projects. The findings and the implications presented in this paper will be useful for developers and researchers who are interested in developing and maintaining LUs.

链接与引用

DOI 原文 ·

BibTeX
@inproceedings{paperbot5635,
  title = {Studying the use of Java logging utilities in the wild},
  author = {Boyuan Chen and Zhen Ming (Jack) Jiang},
  booktitle = {ICSE},
  year = {2020},
  doi = {10.1145/3377811.3380408}
}