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 的日志解析面临的若干挑战与机遇。