Studying the Use of Java']Java Logging Utilities in the Wild

被引:15
|
作者
Chen, Boyuan [1 ]
Jiang, Zhen Ming [1 ]
机构
[1] York Univ, Toronto, ON, Canada
来源
2020 ACM/IEEE 42ND INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING (ICSE 2020) | 2020年
关键词
empirical software engineering; logging code; logging practices; LARGE-SCALE; SOFTWARE;
D O I
10.1145/3377811.3380408
中图分类号
TP31 [计算机软件];
学科分类号
081202 ; 0835 ;
摘要
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 large-sized 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.
引用
收藏
页码:397 / 408
页数:12
相关论文
共 50 条
  • [1] Extracting and studying the Logging-Code-Issue- Introducing changes in Java']Java-based large-scale open source software systems
    Chen, Boyuan
    Jiang, Zhen Ming
    EMPIRICAL SOFTWARE ENGINEERING, 2019, 24 (04) : 2285 - 2322
  • [2] Dazed and Confused: Studying the Prevalence of Atoms of Confusion in Long-Lived Java']Java Libraries
    Mendes, Wendell
    Pinheiro, Oton
    Santos, Emanuele
    Rocha, Lincoln
    Viana, Windson
    2022 IEEE INTERNATIONAL CONFERENCE ON SOFTWARE MAINTENANCE AND EVOLUTION (ICSME 2022), 2022, : 106 - 116
  • [3] Java']Java and Dylan
    Gentleman, R
    Ihaka, R
    JOURNAL OF COMPUTATIONAL AND GRAPHICAL STATISTICS, 2000, 9 (03) : 452 - 458
  • [4] Characterizing logging practices in Java']Java-based open source software projects - a replication study in Apache Software Foundation
    Chen, Boyuan
    Jiang, Zhen Ming
    EMPIRICAL SOFTWARE ENGINEERING, 2017, 22 (01) : 330 - 374
  • [5] Atoms of Confusion in Java']Java
    Langhout, Chris
    Aniche, Mauricio
    2021 IEEE/ACM 29TH INTERNATIONAL CONFERENCE ON PROGRAM COMPREHENSION (ICPC 2021), 2021, : 25 - 35
  • [6] An OpenMP Library for Java']Java
    Cook, Robert P.
    2013 PROCEEDINGS OF IEEE SOUTHEASTCON, 2013,
  • [7] The evolution of Java']Java build systems
    McIntosh, Shane
    Adams, Bram
    Hassan, Ahmed E.
    EMPIRICAL SOFTWARE ENGINEERING, 2012, 17 (4-5) : 578 - 608
  • [8] Extracting and studying the Logging-Code-Issue- Introducing changes in Java-based large-scale open source software systems
    Boyuan Chen
    Zhen Ming (Jack) Jiang
    Empirical Software Engineering, 2019, 24 : 2285 - 2322
  • [9] JMaCS: a Java']Java monitoring and control system
    Dickens, Rob
    ADVANCED SOFTWARE AND CONTROL FOR ASTRONOMY II, PTS 1 & 2, 2008, 7019
  • [10] A Public Unified Bug Dataset for Java']Java
    Ferenc, Rudolf
    Toth, Zoltan
    Ladanyi, Gergely
    Siket, Istvan
    Gyimothy, Tibor
    PROMISE'18: PROCEEDINGS OF THE 14TH INTERNATIONAL CONFERENCE ON PREDICTIVE MODELS AND DATA ANALYTICS IN SOFTWARE ENGINEERING, 2018, : 12 - 21