Log messages generated by software systems are a rich source of runtime information. This information plays a vital role in enabling developers to maintain systems and diagnose faults effectively. Log parsing is a fundamental prerequisite for downstream tasks. However, existing log parsers rely heavily on large volumes of historical data for feature extraction or model training, and their performance tends to degrade when handling complex or rare log patterns. To address these challenges, we propose Logcode, a novel approach that constructs a diverse dataset by extracting log templates directly from source code. Additionally, Logcode fine-tunes pre-trained models using the diverse dataset, effectively improving the parsing of rare logs. We conduct extensive evaluations on public datasets, and the experimental results demonstrate that Logcode is an effective log parser.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Logcode: Source Code-Driven Log Parsing for Rare Patterns

  • Hongli Su,
  • Jing Li,
  • Guodong Fan,
  • Ming Zhu,
  • Zhiyong Zhao

摘要

Log messages generated by software systems are a rich source of runtime information. This information plays a vital role in enabling developers to maintain systems and diagnose faults effectively. Log parsing is a fundamental prerequisite for downstream tasks. However, existing log parsers rely heavily on large volumes of historical data for feature extraction or model training, and their performance tends to degrade when handling complex or rare log patterns. To address these challenges, we propose Logcode, a novel approach that constructs a diverse dataset by extracting log templates directly from source code. Additionally, Logcode fine-tunes pre-trained models using the diverse dataset, effectively improving the parsing of rare logs. We conduct extensive evaluations on public datasets, and the experimental results demonstrate that Logcode is an effective log parser.