Automated Logging Is Language-Sensitive: A Multilingual Benchmark and Empirical Study of LLMs
Renyi Zhong, Yichen Li, Yulun Wu, Jinxi Kuang, Yintong Huo, Michael R. LyuLogging 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.