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 条
  • [21] A journey among Java']Java neutral program variants
    Harrand, Nicolas
    Allier, Simon
    Rodriguez-Cancio, Marcelino
    Monperrus, Martin
    Baudry, Benoit
    GENETIC PROGRAMMING AND EVOLVABLE MACHINES, 2019, 20 (04) : 531 - 580
  • [22] Tool-Assisted Componentization of Java']Java Applications
    Hammad, Mahmoud M.
    Abueisa, Ibrahim
    Malek, Sam
    IEEE 19TH INTERNATIONAL CONFERENCE ON SOFTWARE ARCHITECTURE (ICSA 2022), 2022, : 36 - 46
  • [23] An Empirical Study on Maintainable Method Size in Java']Java
    Chowdhury, Shaiful Alam
    Uddin, Gias
    Holmes, Reid
    2022 MINING SOFTWARE REPOSITORIES CONFERENCE (MSR 2022), 2022, : 252 - 264
  • [24] Predicting Defects in SAP Java']Java Code: An Experience Report
    Holschuh, Tilman
    Paeuser, Markus
    Herzig, Kim
    Zimmermann, Thomas
    Premraj, Rahul
    Zeller, Andreas
    2009 31ST INTERNATIONAL CONFERENCE ON SOFTWARE ENGINEERING, COMPANION VOLUME, 2009, : 172 - 181
  • [25] Automatic Source Code Summarization of Context for Java']Java Methods
    McBurney, Paul W.
    McMillan, Collin
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2016, 42 (02) : 103 - 119
  • [26] An Analysis of Library Rollbacks: A Case Study of Java']Java Libraries
    Suwa, Hirohiko
    Ihara, Akinori
    Kula, Raula Gaikovina
    Fujibayashi, Daiki
    Matsumoto, Kenichi
    2017 24TH ASIA-PACIFIC SOFTWARE ENGINEERING CONFERENCE WORKSHOPS (APSECW), 2017, : 63 - 70
  • [27] Mining Common Syntactic Patterns used by Java']Java Programmers
    Losada, Alvaro
    Facundo, Guillermo
    Garcia, Miguel
    Ortin, Francisco
    IEEE LATIN AMERICA TRANSACTIONS, 2022, 20 (05) : 753 - 762
  • [28] Extraction of Java']Java program fingerprints for software authorship identification
    Ding, HB
    Samadzadeh, MH
    JOURNAL OF SYSTEMS AND SOFTWARE, 2004, 72 (01) : 49 - 57
  • [29] Automatic Detection of Java']Java Cryptographic API Misuses: Are We There Yet?
    Zhang, Ying
    Kabir, Md Mahir Asef
    Xiao, Ya
    Yao, Danfeng
    Meng, Na
    IEEE TRANSACTIONS ON SOFTWARE ENGINEERING, 2023, 49 (01) : 288 - 303
  • [30] The Qualitas Corpus: A Curated Collection of Java']Java Code for Empirical Studies
    Tempero, Ewan
    Anslow, Craig
    Dietrich, Jens
    Han, Ted
    Li, Jing
    Lumpe, Markus
    Melton, Hayden
    Noble, James
    17TH ASIA PACIFIC SOFTWARE ENGINEERING CONFERENCE (APSEC 2010), 2010, : 336 - 345