Automated Logging Is Language-Sensitive: A Multilingual Benchmark and Empirical Study of LLMs
Logging statements are central to debugging, failure diagnosis, and production observability, yet writing them requires developers to decide where to place a logging statement, which API and severity level to use, and what runtime information to expose. Automated logging aims to reduce this burden, but existing evidence remains dominated by Java-centric repositorysnapshot datasets. Thus, Java-centered benchmarks do not show whether findings on model behavior and model selection generalize to other programming languages or to real-world maintenance changes that introduce logging statements. This paper presents MultiLogBench, a multilingual benchmark and empirical study spanning six programming language ecosystems. MultiLogBench contains 63,965 production-code repository-snapshot instances, 744 revision-history cases where developers introduce logging statements during maintenance, and a paired transformed revision-history branch for robustness analysis. Using seven contemporary large language models under a unified protocol, we evaluate logging-site localization, frameworkanchor matching, severity prediction, message generation, variable recovery, and cascaded overall quality. Results show that automated logging is sensitive to language-ecosystem conditions. On repository-snapshot data, absolute performance levels and component profiles vary across language-specific subsets, with position prediction exhibiting the largest average withinmodel component gap. The six language-specific CCS leaderboards are nevertheless highly correlated, with a mean pairwise Spearman correlation of 0.912, and identify the same top two models; reordering is concentrated among the middle- and lower-tier models. Among the primary structural buckets, loop and nested-callable sites are the hardest. On revision-history data, the six-language mean declines across all displayed metrics, cross-language score dispersion persists, the component profile shifts toward greater framework-anchor dispersion, and the repository-snapshot top-two stability does not persist. Transformed inputs do not cause a broad same-direction performance collapse. These results show that single-language evaluation is informative for identifying the leading models in the controlled repository-snapshot benchmark, but is insufficient for estimating absolute performance across language ecosystems, diagnosing component-specific weaknesses beyond the evaluated language, or establishing a fine-grained model ordering below the top two that transfers across languages.
Authors
- Yintong Huo (ORCID: https://orcid.org/0009-0006-8798-5667)
- Jinxi Kuang (ORCID: https://orcid.org/0000-0002-1987-2533)
- Renyi Zhong (ORCID: https://orcid.org/0000-0001-6626-4437)
- Michael R. Lyu (ORCID: https://orcid.org/0000-0002-3666-5798)
- Yulun Wu
- Yichen Li (ORCID: https://orcid.org/0009-0009-8370-644X)
Institutions
- Chinese University of Hong Kong (HK)
- Singapore Management University (SG)
Publication Details
- Journal
- ACM Transactions on Software Engineering and Methodology
- Published
- 2026-10-26
- DOI
- https://doi.org/10.1145/3860542
- Primary Topic
- Software Engineering Research
- Type
- article
- Field-Weighted Citation Impact
- 0.00
Funders
- Chinese University of Hong Kong