An Exploratory Study of Log Placement Recommendation in an Enterprise System
Not on the map. Why?
Abstract (arXiv)
Logging is a development practice that plays an important role in the operations and monitoring of complex systems. Developers place log statements in the source code and use log data to understand how the system behaves in production. Unfortunately, anticipating where to log during development is challenging. Previous studies show the feasibility of leveraging machine learning to recommend log placement despite the data imbalance since logging is a fraction of the overall code base. However, it remains unknown how those techniques apply to an industry setting, and little is known about the effect of imbalanced data and sampling techniques. In this paper, we study the log placement problem in the code base of Adyen, a large-scale payment company. We analyze 34,526 Java files and 309,527 methods that sum up +2M SLOC. We systematically measure the effectiveness of five models based on code metrics, explore the effect of sampling techniques, understand which features models consider to be relevant for the prediction, and evaluate whether we can exploit 388,086 methods from 29 Apache projects to learn where to log in an industry setting. Our best performing model achieves 79% of balanced accuracy, 81% of precision, 60% of recall. While sampling techniques improve recall, they penalize precision at a prohibitive cost. Experiments with open-source data yield under-performing models over Adyen's test set; nevertheless, they are useful due to their low rate of false positives. Our supporting scripts and tools are available to the community.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Builds on 1 of its 54 references that are in the map. First posted on arXiv 2 Mar 2021.
Builds on
1 of 54 references.
References · 1
Built on by
Citing papers per year: 2021: 2; 2022: 1; 2023: 0; 2024: 0; 2025: 1.
4 papers.
- 2021A Comprehensive Survey of Logging in Software: From Logging Statements Automation to Log Mining and Analysiscited by 6
- 2022Data-Driven Approach for Log Instruction Quality Assessmentcited by 1
- 2025OpenDerisk: An Industrial Framework for AI-Driven SRE, with Design, Implementation, and Case Studiescited by 1
- 2021Borrowing from Similar Code: A Deep Learning NLP-Based Approach for Log Statement Automationcited by 0
- 2025OpenDerisk: An Industrial Framework for AI-Driven SRE, with Design, Implementation, and Case Studies15 Oct 2025
- 2022Data-Driven Approach for Log Instruction Quality Assessment6 Apr 2022
- 2021Borrowing from Similar Code: A Deep Learning NLP-Based Approach for Log Statement Automation2 Dec 2021
- 2021A Comprehensive Survey of Logging in Software: From Logging Statements Automation to Log Mining and Analysis24 Oct 2021