FastLog: An End-to-End Method to Efficiently Generate and Insert Logging Statements

Fuente: arXiv
Saved in:
Bibliographic Details
Main Authors: Xie, Xiaoyuan, Cai, Zhipeng, Chen, Songqiang, Xuan, Jifeng
Format: Preprint
Published: 2023
Subjects:
Online Access:
Tags: Add Tag
No Tags, Be the first to tag this record!
_version_ 1866910390348152832
author Xie, Xiaoyuan
Cai, Zhipeng
Chen, Songqiang
Xuan, Jifeng
author_facet Xie, Xiaoyuan
Cai, Zhipeng
Chen, Songqiang
Xuan, Jifeng
contents Logs play a crucial role in modern software systems, serving as a means for developers to record essential information for future software maintenance. As the performance of these log-based maintenance tasks heavily relies on the quality of logging statements, various works have been proposed to assist developers in writing appropriate logging statements. However, these works either only support developers in partial sub-tasks of this whole activity; or perform with a relatively high time cost and may introduce unwanted modifications. To address their limitations, we propose FastLog, which can support the complete logging statement generation and insertion activity, in a very speedy manner. Specifically, given a program method, FastLog first predicts the insertion position in the finest token level, and then generates a complete logging statement to insert. We further use text splitting for long input texts to improve the accuracy of predicting where to insert logging statements. A comprehensive empirical analysis shows that our method outperforms the state-of-the-art approach in both efficiency and output quality, which reveals its great potential and practicality in current real-time intelligent development environments.
format Preprint
id arxiv_https___arxiv_org_abs_2311_02862
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle FastLog: An End-to-End Method to Efficiently Generate and Insert Logging Statements
Xie, Xiaoyuan
Cai, Zhipeng
Chen, Songqiang
Xuan, Jifeng
Software Engineering
Logs play a crucial role in modern software systems, serving as a means for developers to record essential information for future software maintenance. As the performance of these log-based maintenance tasks heavily relies on the quality of logging statements, various works have been proposed to assist developers in writing appropriate logging statements. However, these works either only support developers in partial sub-tasks of this whole activity; or perform with a relatively high time cost and may introduce unwanted modifications. To address their limitations, we propose FastLog, which can support the complete logging statement generation and insertion activity, in a very speedy manner. Specifically, given a program method, FastLog first predicts the insertion position in the finest token level, and then generates a complete logging statement to insert. We further use text splitting for long input texts to improve the accuracy of predicting where to insert logging statements. A comprehensive empirical analysis shows that our method outperforms the state-of-the-art approach in both efficiency and output quality, which reveals its great potential and practicality in current real-time intelligent development environments.
title FastLog: An End-to-End Method to Efficiently Generate and Insert Logging Statements
topic Software Engineering
url https://arxiv.org/abs/2311.02862