Skip to main navigation Skip to search Skip to main content

Automatic recommendation to appropriate log levels

  • Taeyoung Kim
  • , Suntae Kim*
  • , Sooyong Park
  • , Young Beom Park
  • *Corresponding author for this work
  • Jeonbuk National University
  • Sogang University
  • Dankook University

Research output: Contribution to journalJournal articlepeer-review

Abstract

A log statement is one of the key tactics for a developer to record and monitor important run-time behaviors of our system in a development phase and a maintenance phase. It composes of a message for stating log contents, and a log level (eg, debug or warn) to denote the severity of a message and controlling its visibility at run time. In spite of its usefulness, a developer does not tend to deeply consider which log level is appropriate in writing source code, which causes the system to be unmaintainable. To address this issue, this paper proposes an automatic approach to validating the appropriateness of the log level in consideration of the semantic and syntactic features and recommending a proper alternative log level. We first build the semantic feature vector to quantify the semantic similarity among application log messages using the word vector space, and the syntactic feature vector to capture the application context that surrounds the log statement. Based on the feature vectors and machine learning techniques, the log level is automatically validated, and an alternative log level is recommended if the log level is invalid. For the evaluation, we collected 22 open-source projects from three application domains, and obtained the 77% of precision and 75% of recall in validating the log levels. Also, our approach showed 6% higher accuracy than that of the developer group who has 7 to 8 years of work experience, and 72% of the developers accepted our recommendation.

Original languageEnglish
Pages (from-to)189-209
Number of pages21
JournalSoftware - Practice and Experience
Volume50
Issue number3
DOIs
StatePublished - 2020.03.1

Keywords

  • log level
  • log message
  • log statement
  • machine Learning
  • semantic & syntactic feature vector

Quacquarelli Symonds(QS) Subject Topics

  • Computer Science & Information Systems

Fingerprint

Dive into the research topics of 'Automatic recommendation to appropriate log levels'. Together they form a unique fingerprint.

Cite this