L3R:基于图神经网络的日志语句级别推荐方法研究

L3R: LOG PRINTING STATEMENT LEVEL RECOMMENDER BASED ON GRAPH NEURAL NETWORK

  • 摘要: 由于缺失日志使用标准规范,为日志语句选择正确的级别是一项挑战。现有日志级别推荐方法忽视了语句间的关系,且无法实现精准到语句位置的日志级别推荐。针对上述问题,提出一种基于图神经网络的日志级别推荐方法L3R。该方法以语句特征为节点、以控制流和数据流边为边构图,并基于关系图注意力网络更新日志语句特征,完成对日志级别的预测。为验证该方法的有效性,在7个开源项目进行实验,实验结果验证了该方法的有效性。

     

    Abstract: Due to the lack of a rigorous specification to guide logging behaviors, choosing the correct level for log statements is a challenge. Prior studies on log level suggestion ignore the relationship between statements and fail to provide suggestions for logging statements at any specific positions. Based on this, L3R, a GNN-based log level suggest method, is proposed. The method took statement features as nodes, control flow and data flow edges as edges to construct a context graph, updated the logging statement feature based on the relational graph attention network and implemented the log level prediction. Evaluations were conducted on 7 open-source projects, which verified the effectiveness of the method.

     

/

返回文章
返回