Content area

Abstract

Log levels are crucial to distinguish the severity of logs and directly reflecting the urgency of transactions in software systems. Automatically and efficiently determining log levels is a crucial and challenging task in log management. Current log-level automatic prediction approaches using Abstract Syntax Tree-based representation graphs do not consider the fine-grained semantics, e.g., the effects of subtle syntactic differences among similar programs and the semantics of different edges, which leads to poor accuracy in log-level prediction. To address these issues, we perform data augmentation by changing the shape of the abstract syntax tree based on code transformations without changing the semantics of the code. Meanwhile, we integrate Data Flow and Call Relationships into a code representation graph and define eight types of edges in the graph. Then, we design a multi-relational graph neural network that learns the impact of different types of edges on the log-level prediction task and learns the corresponding weights of these edges based on their types. To verify the effectiveness of our proposed approach, we conduct experiments in widely-used open-source systems. Experimental results show that our proposed approach has prominent advantages over state-of-the-art methods in predicting log levels.

Details

1009240
Business indexing term
Title
Learning the fine-grained code representation for log-level prediction
Author
Zhao, Zhiyong 1 ; Fan, Guodong 2 ; Li, Jing 1 ; Zhu, Ming 1 ; Zhang, Haotian 1 ; Su, Hongli 1 

 Shandong University of Technology, School of Computer Science and Technology, Zibo, China (GRID:grid.412509.b) (ISNI:0000 0004 1808 3414) 
 Shandong Agriculture and Engineering University, School of Information Science and Engineering, Zibo, China (GRID:grid.494558.1) (ISNI:0000 0004 1796 3356) 
Volume
37
Issue
4
Pages
51
Publication year
2025
Publication date
Jun 2025
Publisher
Springer Nature B.V.
Place of publication
Amsterdam
Country of publication
Netherlands
Publication subject
e-ISSN
13191578
Source type
Scholarly Journal
Language of publication
English
Document type
Journal Article
Publication history
 
 
Online publication date
2025-05-30
Milestone dates
2025-05-15 (Registration); 2025-03-19 (Received); 2025-05-15 (Accepted)
Publication history
 
 
   First posting date
30 May 2025
ProQuest document ID
3256874524
Document URL
https://www.proquest.com/scholarly-journals/learning-fine-grained-code-representation-log/docview/3256874524/se-2?accountid=208611
Copyright
© The Author(s) 2025. This work is published under http://creativecommons.org/licenses/by-nc-nd/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.
Last updated
2025-10-05
Database
ProQuest One Academic