Large Language Models for Online Log Parsing in AIOps
摘要
Logs play a crucial role in modern software development by providing essential runtime information. Automated log analysis begins with log parsing, which transforms unstructured log data into a structured format. In AIOps (Artificial Intelligence for IT Operations), log parsing is a fundamental step that enables downstream tasks such as anomaly detection and root cause analysis. Traditional log parsing methods, including heuristic rules, regular expressions, and statistical approaches, often struggle with unseen log formats, noisy data, and evolving system logs. Meanwhile, deep learning-based methods require model tuning on fixed training log files, limiting their adaptability to diverse log formats in AIOps environments. To address these challenges, we propose XLog, an efficient log parsing framework that integrates two key components: (1) a Search Tree, which efficiently organizes and matches known log templates to reduce redundancy and computational overhead, and (2) an LLM-based Template Extractor, which dynamically identifies new log templates using in-context learning with carefully designed prompts, enabling adaptation to previously unseen log formats. This hybrid approach ensures both efficiency and flexibility in log parsing. We evaluated XLog on 16 widely used public datasets, and experimental results demonstrate that our framework achieves superior log parsing accuracy (98% average parsing accuracy).