PulseExploreJournal ClubDebatesTrendingResearchersJournals
Instagram
HomeExploreJournal ClubTrending
Synapse
⌘+K
Synapse
February 6, 202462 citations

UniLog: Automatic Logging via LLM and In-Context Learning

View Full Paper
JXJunjielong XuZCZ.Y. CuiYZYuan Zhao

Key Points

Key points are not available for this paper at this time.

Abstract

Logging, which aims to determine the position of logging statements, the verbosity levels, and the log messages, is a crucial process for software reliability enhancement. In recent years, numerous automatic logging tools have been designed to assist developers in one of the logging tasks (e.g., providing suggestions on whether to log in try-catch blocks). These tools are useful in certain situations yet cannot provide a comprehensive logging solution in general. Moreover, although recent research has started to explore end-to-end logging, it is still largely constrained by the high cost of fine-tuning, hindering its practical usefulness in software development. To address these problems, this paper proposes UniLog, an automatic logging framework based on the in-context learning (ICL) paradigm of large language models (LLMs). Specifically, UniLog can generate an appropriate logging statement with only a prompt containing five demonstration examples without any model tuning. In addition, UniLog can further enhance its logging ability after warmup with only a few hundred random samples. We evaluated UniLog on a large dataset containing 12,012 code snippets extracted from 1,465 GitHub repositories. The results show that UniLog achieved the state-of-the-art performance in automatic logging: (1) 76.9% accuracy in selecting logging positions, (2) 72.3% accuracy in predicting verbosity levels, and (3) 27.1 BLEU-4 score in generating log messages. Meanwhile, UniLog requires less than 4% of the parameter tuning time needed by fine-tuning the same LLM.

Ask AI
Helpful
Bookmark
Share
View Full Paper

Cite This Study

Xu et al. (2024) studied this question.

synapsesocial.com/papers/6a0f71c2d13714ec96fe2a90https://doi.org/10.1145/3597503.3623326
Ask AI
Helpful
Bookmark
Share
View Full Paper

Also Consider

Synapse has enriched 5 closely related papers on similar clinical questions. Consider them for comparative context:

  1. 1UiLog: Improving Log-Based Fault Diagnosis by Log Analysis2016 · 59 citations
  2. 2Retrieval-based neural source code summarization2020 · 251 citations
  3. 3SherLog2010 · 173 citations
  4. 4Easy over hard: a case study on deep learning2017 · 154 citations
  5. 5Exploring the Limits of Transfer Learning with a Unified Text-to-Text Transformer2019 · 3,700 citations