它们都好吗?研究从业者对日志消息可读性的期望
Are They All Good? Studying Practitioners' Expectations on the Readability of Log Messages
AI总结:
本文通过访谈与问卷提炼日志消息可读性准则,发现开源项目中38.1%的日志可读性不足,并证明深度学习和机器学习模型可自动分类,平均平衡准确率超过80%。
摘要:
开发者编写日志语句以生成日志,这些日志为各类任务提供运行时信息。日志语句中日志消息(即描述性文本)的可读性对于所生成日志的价值至关重要。不成熟的日志消息可能会拖慢甚至阻碍日志分析过程。尽管日志消息十分重要,但对于什么构成良好的日志消息可读性以及如何编写它们,仍然缺乏标准。本文中,我们对17名工业界从业者进行了一系列访谈,以调查他们对日志消息可读性的期望。通过访谈,我们提炼出与日志消息可读性相关的三个方面,包括结构、信息和措辞,并提出了改进每个方面的若干具体实践。我们通过一系列在线问卷调查验证了研究发现,并收到了参与者的积极反馈。随后,我们人工调研了大规模开源系统中日志消息的可读性,发现很大一部分(38.1%)日志消息的可读性不足。受此观察启发,我们进一步探索了使用深度学习和机器学习模型自动分类日志消息可读性的潜力。我们发现,深度学习和机器学习模型均能有效分类日志消息的可读性,平均平衡准确率超过80.0%。本研究为编写日志消息提供了全面指南,以进一步改进从业者的日志实践。
英文摘要:
Developers write logging statements to generate logs that provide run-time information for various tasks. The readability of log messages in the logging statements (i.e., the descriptive text) is rather crucial to the value of the generated logs. Immature log messages may slow down or even obstruct the process of log analysis. Despite the importance of log messages, there is still a lack of standards on what constitutes good readability in log messages and how to write them. In this paper, we conduct a series of interviews with 17 industrial practitioners to investigate their expectations on the readability of log messages. Through the interviews, we derive three aspects related to the readability of log messages, including Structure, Information, and Wording, along with several specific practices to improve each aspect. We validate our findings through a series of online questionnaire surveys and receive positive feedback from the participants. We then manually investigate the readability of log messages in large-scale open source systems and find that a large portion (38.1%) of the log messages have inadequate readability. Motivated by such observation, we further explore the potential of automatically classifying the readability of log messages using deep learning and machine learning models. We find that both deep learning and machine learning models can effectively classify the readability of log messages with a balanced accuracy above 80.0% on average. Our study provides comprehensive guidelines for composing log messages to further improve practitioners' logging practices.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。