Can You Capture Information As You Intend To? A Case Study on Logging Practice in Industry

Abstract
Background: Logs provide crucial information to understand the dynamic behavior of software systems in modern software development and maintenance. Usually, logs are produced by log statements which will be triggered and executed under certain conditions. However, current studies paid very limited attention to developers’ Intentions and Concerns (I&C) on logging practice, leading uncertainty that whether the developers’ I&C are properly reflected by log statements and questionable capability to capture the expected information of system behaviors in logs. Objective: This study aims to reveal the status of developers’ I&C on logging practice and more importantly, how the I&C are properly reflected in software source code in real-world software development. Method: We collected evidence from two sources of a series of interviews and source code analysis which are conducted in a big-data company, followed by consolidation and analysis of the evidence. Results: Major gaps and inconsistencies have been identified between the developers’ I&C and real log statements in source code. Many code snippets contained no log statements that the interviewees claimed to have inserted. Conclusion: Developers’ original I&C towards logging practice are usually poorly realized, which inevitably impacted the motivation and purpose to conduct this practice.
Type
Publication
International Conference on Software Maintenance and Evolution
Status
Peer-reviewed

Authors
Shenghui (Samuel) Gu
(he/him)
Researcher in Trustworthy AI and Software Engineering
I build methods for testing, validating, and improving trustworthy AI-enabled software systems.
My research lies at the intersection of Software Engineering, AI Safety, and System Reliability, spanning LLM-driven testing, search-based software engineering for autonomous systems, and AIOps for distributed architectures.
A central theme of my work is to make generative AI useful, interpretable, and dependable for solving complex validation problems in safety-critical and large-scale industrial systems.