Larger Is Not Always Better: Exploring Small Open-source Language Models in Logging Statement Generation
Not on the map. Why?
Abstract (arXiv)
Developers use logging statements to create logs that document system behavior and aid in software maintenance. As such, high-quality logging is essential for effective maintenance; however, manual logging often leads to errors and inconsistency. Recent methods emphasize using large language models (LLMs) for automated logging statement generation, but these present privacy and resource issues, hindering their suitability for enterprise use. This paper presents the first large-scale empirical study evaluating small open-source language models (SOLMs) for automated logging statement generation. We evaluate four prominent SOLMs using various prompt strategies and parameter-efficient fine-tuning techniques, such as Low-Rank Adaptation (LoRA) and Retrieval-Augmented Generation (RAG). Our results show that fine-tuned SOLMs with LoRA and RAG prompts, particularly Qwen2.5-coder-14B, outperform existing tools and LLM baselines in predicting logging locations and generating high-quality statements, with robust generalization across diverse repositories. These findings highlight SOLMs as a privacy-preserving, efficient alternative for automated logging.
Key facts. Cited by 3 papers in the map (data through 14 Oct 2026). First posted on arXiv 22 May 2025.
Builds on
No reference list yet.
Built on by
Citing papers per year: 2025: 1; 2026: 2.
3 papers.
Similar, not cited
Close in wording, no citation either way
- 2026Benchmarking Small Language Models and Small Reasoning Language Models on System Log Severity Classification
- 2026ThinkLog: Leveraging Reasoning for Log Statement Generation
- 2024Go Static: Contextualized Logging Statement Generation
- 2026Beyond Strict Rules: Assessing the Effectiveness of Large Language Models for Code Smell Detection ↗
- 2025Defects4Log: Benchmarking LLMs for Logging Code Defect Detection and Reasoning
- 2025AdaptiveLog: An Adaptive Log Analysis Framework with the Collaboration of Large and Small Language Model
- 2024LogEval: A Comprehensive Benchmark Suite for Large Language Models In Log Analysis
- 2026Instruction-Tuned LLMs for Parsing and Mining Unstructured Logs on Leadership HPC Systems