Software logs play an essential role in ensuring the reliability and maintainability of large-scale software systems, as they are often the sole source of runtime information. Log parsing, which converts raw log messages into structured data, is an important initial step towards downstream log analytics. In recent studies, ChatGPT, the current cutting-edge large language model (LLM), has been widely applied to a wide range of software engineering tasks. However, its performance in automated log parsing remains unclear. In this paper, we evaluate ChatGPT's ability to undertake log parsing by addressing two research questions. (1) Can ChatGPT effectively parse logs? (2) How does ChatGPT perform with different prompting methods? Our results show that ChatGPT can achieve promising results for log parsing with appropriate prompts, especially with few-shot prompting. Based on our findings, we outline several challenges and opportunities for ChatGPT-based log parsing.
翻译:软件日志在确保大规模软件系统的可靠性和可维护性中发挥着关键作用,因为它们往往是运行时信息的唯一来源。日志解析将原始日志消息转换为结构化数据,是下游日志分析的重要初始步骤。在近期研究中,作为当前最先进的大语言模型(LLM),ChatGPT已被广泛应用于各类软件工程任务。然而,其在自动化日志解析中的表现仍不明确。本文通过探究两个研究问题来评估ChatGPT执行日志解析的能力:(1)ChatGPT能否有效解析日志?(2)ChatGPT在不同提示方法下的表现如何?实验结果表明,通过适当的提示(尤其是少量样本提示),ChatGPT在日志解析中能够取得令人满意的成果。基于研究发现,我们归纳了基于ChatGPT的日志解析所面临的若干挑战与机遇。