Abstract

Log automation is a technique that helps developers write high-quality log code. When software systems fail, log code can ease the failure diagnosis process and reduce system recovery time. Existing log automation tools can be roughly classified into two groups: feature- and pattern-based tools. These existing tools define log placement rules by either extracting syntax features or summarizing code patterns, but they are hard to understand the source codes intention. In this paper, we design and implement SmartLog, which can create log statements based on deep understanding of log intention. To achieve this, we propose a log intention description model to describe the intention of log statements. SmartLog then explores the intentions of existing logs and mines log rules from those intentions. We evaluated SmartLog on six mature open-source projects. Compared with two state-of-the-art projects, i.e., Errlog and LogAdvisor, SmartLog improved the accuracy of log placement by 43% and 16% respectively. SmartLog could cover 49 out of 86 real-world patches aimed to add logs, while the state-of-the-art works could cover 10 and 22 patches, respectively.

Full Text
Paper version not known

Talk to us

Join us for a 30 min session where you can share your feedback and ask us any queries you have

Schedule a call

Disclaimer: All third-party content on this website/platform is and will remain the property of their respective owners and is provided on "as is" basis without any warranties, express or implied. Use of third-party content does not indicate any affiliation, sponsorship with or endorsement by them. Any references to third-party content is to identify the corresponding services and shall be considered fair use under The CopyrightLaw.