Background: Logging is an important part of modern software projects; logs are used in several tasks such as debugging and testing. Due to the complex nature of logging, it remains a difficult task with several pitfalls that could have serious consequences. Several other domains of software engineering have mitigated such threats by identifying the early signs of more serious issues, i.e., "smells". However, this concept is not yet properly defined for logging. Objective: The goal of this study is to create a taxonomy of log smells that can help developers write better logging code. To further help the developers and to identify issues that need more attention from the research community, we also map the identified smells to existing tools addressing them. Methods: We identified logging issues and tools by conducting a survey of the scientific literature. After extracting relevant data from 45 articles, we used them to define logging issues using open coding technique and classified the defined issues using card sorting. We classify the tools based on their reported output. Results: The paper presents a taxonomy of ten log smells, describing several facets for each of them. We also review existing tools addressing some of these facets, highlighting the lack of tools addressing some log smells and identifying future research opportunities to close this gap.
翻译:背景:日志记录是现代软件项目的重要组成部分;日志被用于调试和测试等多项任务。由于日志记录的复杂性,它仍然是一项困难的任务,存在若干可能造成严重后果的隐患。软件工程的其他领域已通过识别更严重问题的早期迹象(即"异味")来缓解此类威胁。然而,这一概念尚未在日志记录领域得到准确定义。目标:本研究旨在建立一种日志异味分类法,以帮助开发者编写更优质的日志代码。为了进一步协助开发者并明确需要研究界更多关注的问题,我们还将已识别的异味与现有的处理工具进行映射。方法:我们通过对科学文献的调研来识别日志问题及相关工具。从45篇文献中提取相关数据后,采用开放式编码技术定义日志问题,并通过卡片分类法对定义的问题进行分类。我们根据工具报告的输出结果对工具进行分类。结果:本文提出了包含十种日志异味的分类法,详细描述了每种异味的多个维度。同时,我们综述了处理部分维度的现有工具,指出某些日志异味缺乏对应工具的研究现状,并明确了填补这一空白的未来研究方向。