The Sense of Logging in the Linux Kernel

08/13/2022
by   Keyur Patel, et al.
0

Logging plays a crucial role in software engineering because it is key to perform various tasks including debugging, performance analysis, and detection of anomalies. Despite the importance of log data, the practice of logging still suffers from the lack of common guidelines and best practices. Recent studies investigated logging in C/C++ and Java open-source systems. In this paper, we complement these studies by conducting the first empirical study on logging practices in the Linux kernel, one of the most elaborate open-source development projects in the computer industry. We analyze 22 Linux releases with a focus on three main aspects: the pervasiveness of logging in Linux, the types of changes made to logging statements, and the rationale behind these changes. Our findings show that logging code accounts for 3.73 source code in the Linux kernel, distributed across 72.36 also found that the distribution of logging statements across Linux subsystems and their components vary significantly with no apparent reasons, suggesting that developers use different criteria when logging. In addition, we observed a slow decrease in the use of logging-reduction of 9.27 and v5.3. The majority of changes in logging code are made to fix language issues, modify log levels, and upgrade logging code to use new logging libraries, with the overall goal of improving the precision and consistency of the log output. Many recommendations are derived from our findings such as the use of static analysis tools to detect log-related issues, the adoption of common writing styles to improve the quality of log messages, the development of conventions to guide developers when selecting log levels, the establishment of review sessions to review logging code, and so on. [...]

READ FULL TEXT

page 1

page 2

page 3

page 4

research
03/27/2022

Code Review Practices for Refactoring Changes: An Empirical Study on OpenStack

Modern code review is a widely used technique employed in both industria...
research
08/17/2023

Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messages

Developers write logging statements to generate logs that provide run-ti...
research
08/08/2021

Empirical Analysis on Effectiveness of NLP Methods for Predicting Code Smell

A code smell is a surface indicator of an inherent problem in the system...
research
03/02/2021

An Exploratory Study of Log Placement Recommendation in an Enterprise System

Logging is a development practice that plays an important role in the op...
research
01/10/2023

Studying Logging Practice in Machine Learning-based Applications

Logging is a common practice in traditional software development. Severa...
research
09/14/2023

An Assessment of ChatGPT on Log Data

Recent development of large language models (LLMs), such as ChatGPT has ...
research
04/06/2022

Data-Driven Approach for Log Instruction Quality Assessment

In the current IT world, developers write code while system operators ru...

Please sign up or login with your details

Forgot password? Click here to reset