Skip to main navigation Skip to search Skip to main content

A Qualitative Study of the Benefits and Costs of Logging from Developers' Perspectives

  • Queen's University Kingston
  • Concordia University
  • Polytechnique Montréal

Research output: Contribution to journal › Journal Article › peer-review

56 Citations (Scopus)

Abstract

Software developers insert logging statements in their source code to collect important runtime information of software systems. In practice, logging appropriately is a challenge for developers. Prior studies aimed to improve logging by proactively inserting logging statements in certain code snippets or by learning where to log from existing logging code. However, there exists no work that systematically studies developers' logging considerations, i.e., the benefits and costs of logging from developers' perspectives. Without understanding developers' logging considerations, automated approaches for logging decisions are based primarily on researchers' intuition which may not be convincing to developers. In order to fill the gap between developers' logging considerations and researchers' intuition, we performed a qualitative study that combines a survey of 66 developers and a case study of 223 logging-related issue reports. The findings of our qualitative study draw a comprehensive picture of the benefits and costs of logging from developers' perspectives. We observe that developers consider a wide range of logging benefits and costs, while most of the uncovered benefits and costs have never been observed nor discussed in prior work. We also observe that developers use ad hoc strategies to balance the benefits and costs of logging. Developers need to be fully aware of the benefits and costs of logging, in order to better benefit from logging (e.g., leveraging logging to enable users to solve problems by themselves) and avoid unnecessary negative impact (e.g., exposing users' sensitive information). Future research needs to consider such a wide range of logging benefits and costs when developing automated logging strategies. Our findings also inspire opportunities for researchers and logging library providers to help developers balance the benefits and costs of logging, for example, to support different log levels for different parts of a logging statement, or to help developers estimate and reduce the negative impact of logging statements.

Original languageEnglish
Pages (from-to)2858-2873
Number of pages16
JournalIEEE Transactions on Software Engineering
Volume47
Issue number12
DOIs
Publication statusPublished - 1 Dec 2021
Externally publishedYes

Keywords

  • Software logging
  • developer survey
  • issue reports
  • qualitative analysis

ASJC Scopus subject areas

  • Software

Fingerprint

Dive into the research topics of 'A Qualitative Study of the Benefits and Costs of Logging from Developers' Perspectives'. These topics are generated from the title and abstract of the publication. Together, they form a unique fingerprint.

Cite this