LLM-SrcLog: Towards Proactive and Unified Log Template Extraction via Large Language Models
Jiaqi Sun, Wei Li, Heng Zhang, Chutong Ding, Shiyou Qian, Jian Cao, Guangtao Xue

TL;DR
LLM-SrcLog introduces a proactive, source-code-based log template extraction framework using large language models, significantly improving accuracy and efficiency over existing reactive, log-centric methods.
Contribution
It presents a novel unified approach combining static code analysis and LLM-based template extraction, enabling proactive log parsing from source code and enhancing performance in real-world systems.
Findings
Improves F1-score by 2-17% over baselines
Achieves 1,000x faster parsing than per-log LLM methods
Effective in industrial-scale production environments
Abstract
Log parsing transforms raw logs into structured templates containing constants and variables. It underpins anomaly detection, failure diagnosis, and other AIOps tasks. Current parsers are mostly reactive and log-centric. They only infer templates from logs, mostly overlooking the source code. This restricts their capacity to grasp dynamic log structures or adjust to evolving systems. Moreover, per-log LLM inference is too costly for practical deployment. In this paper, we propose LLM-SrcLog, a proactive and unified framework for log template parsing. It extracts templates directly from source code prior to deployment and supplements them with data-driven parsing for logs without available code. LLM-SrcLog integrates a cross-function static code analyzer to reconstruct meaningful logging contexts, an LLM-based white-box template extractor with post-processing to distinguish constants…
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsSoftware System Performance and Reliability · Cloud Computing and Resource Management · Business Process Modeling and Analysis
