DeepLV: Suggesting Log Levels Using Ordinal Based Neural Networks
Zhenhao Li, Heng Li, Tse-Hsun Peter Chen, Weiyi Shang
摘要
Developers write logging statements to generate logs that provide valuable runtime information for debugging and maintenance of software systems. Log level is an important component of a logging statement, which enables developers to control the information to be generated at system runtime. However, due to the complexity of software systems and their runtime behaviors, deciding a proper log level for a logging statement is a challenging task. For example, choosing a higher level (e.g., error) for a trivial event may confuse end users and increase system maintenance overhead, while choosing a lower level (e.g., trace) for a critical event may prevent the important execution information to be conveyed opportunely. In this paper, we tackle the challenge by first conducting a preliminary manual study on the characteristics of log levels. We find that the syntactic context of the logging statement and the message to be logged might be related to the decision of log levels, and log levels that are further apart in order (e.g., trace and error) tend to have more differences in their characteristics. Based on this, we then propose a deep-learning based approach that can leverage the ordinal nature of log levels to make suggestions on choosing log levels, by using the syntactic context and message features of the logging statements extracted from the source code. Through an evaluation on nine large-scale open source projects, we find that: 1) our approach outperforms the state-of-the-art baseline approaches; 2) we can further improve the performance of our approach by enlarging the training data obtained from other systems; 3) our approach also achieves promising results on cross-system suggestions that are even better than the baseline approaches on within-system suggestions. Our study highlights the potentials in suggesting log levels to help developers make informed logging decisions.
问问这篇 Paper
智能体会读完全文。
Lune 把这篇 Paper 索引到了最后一个公式,引用它的顶会 Paper 也一样。你提问,回答直接引用原文。
引用它的顶会 Paper17
- Using Deep Learning to Generate Complete Log StatementsAntonio Mastropaolo, Luca Pascarella, Gabriele BavotaICSE 2022 · 被引用 60 次
- Deep Learning or Classical Machine Learning? An Empirical Study on Log-Based Anomaly DetectionBoxi Yu, Jiayi Yao, Qiuai Fu, Zhiqing Zhong 等ICSE 2024 · 被引用 49 次
- Did We Miss Something Important? Studying and Exploring Variable-Aware Log AbstractionZhenhao Li, Chuan Luo, Tse-Hsun Chen, Weiyi Shang 等ICSE 2023 · 被引用 41 次
- Code Search is All You Need? Improving Code Suggestions with Code SearchJunkai Chen, Xing Hu, Zhenhao Li, Cuiyun Gao 等ICSE 2024 · 被引用 31 次
- TeLL: log level suggestions via modeling multi-level code block informationJiahao Liu, Jun Zeng, Xiang Wang, Kaihang Ji 等ISSTA 2022 · 被引用 20 次
它引用的顶会 Paper1
相关 Paper
- Are They All Good? Studying Practitioners' Expectations on the Readability of Log MessagesZhenhao Li, An Ran Chen, Xing Hu, Xin Xia 等ASE 2023 · 被引用 6 次
- UniLog: Automatic Logging via LLM and In-Context LearningJunjielong Xu, Ziang Cui, Yuan Zhao, Xu Zhang 等ICSE 2024 · 被引用 56 次
- How Do Developers' Profiles and Experiences Influence their Logging Practices? An Empirical Study of Industrial PractitionersGuoping Rong, Shenghui Gu, Haifeng Shen, He Zhang 等ICSE 2023 · 被引用 4 次
- On the Temporal Relations between Logging and CodeZishuo Ding, Yiming Tang, Yang Li, Heng Li 等ICSE 2023 · 被引用 9 次
- Go Static: Contextualized Logging Statement GenerationYichen Li, Yintong Huo, Renyi Zhong, Zhihan Jiang 等FSE 2024 · 被引用 17 次
