skip to main content
10.1145/2856636.2856637acmotherconferencesArticle/Chapter ViewAbstractPublication PagesisecConference Proceedingsconference-collections
research-article

LogOpt: Static Feature Extraction from Source Code for Automated Catch Block Logging Prediction

Published: 18 February 2016 Publication History

Abstract

Software logging is an important software development practice which is used to trace important software execution points. This execution information can provide important insight to developer while software debugging. Inspite of many benefits logging is often done in an ad-hoc manner based only on knowledge and experience of software developer because of lack of formal guidelines and training required for making strategic logging decision. It is known that appropriate logging is beneficial for developers but inappropriate logging can have adverse effect on the system. Excessive logging can not only cause performance and cost overhead, it can also lessen the benefit of logging by producing tons of useless logs. Sparse logging can make logging ineffective by leaving out important information. In order to lessen the load of software developers and to improve the quality of software logging, in this work we propose 'LogOpt' tool to help developers in making informed logging decision. LogOpt uses static features from source code to make catch block logging decision. LogOpt is a machine learning based framework which learns the characteristics of logged and unlogged training instance to make informed logging decision. We manually analyze snippets of logged and unlogged source code and extracted 46 distinguishing features important in making logging decision. We evaluated LogOpt on two large open source projects Apache Tomcat and CloudStack (nearly 1.41M LOC). Results show that LogOpt is effective for automated logging task.

References

[1]
Q. Fu, J. Zhu, W. Hu, J.-G. Lou, R. Ding, Q. Lin, D. Zhang, and T. Xie. Where do developers log? an empirical study on logging practices in industry. In Companion Proceedings of the 36th International Conference on Software Engineering, ICSE Companion 2014, pages 24--33, 2014.
[2]
K. Nagaraj, C. Killian, and J. Neville. Structured comparative analysis of systems logs to diagnose performance problems. In Proceedings of the 9th USENIX Conference on Networked Systems Design and Implementation, NSDI'12, pages 26--26, 2012.
[3]
W. Xu, L. Huang, A. Fox, D. Patterson, and M. Jordan. Experience mining google's production console logs. In Proceedings of the 2010 Workshop on Managing Systems via Log Analysis and Machine Learning Techniques, SLAML'10, pages 5--5, 2010.
[4]
D. Yuan, S. Park, and Y. Zhou. Characterizing logging practices in open-source software. In Proceedings of the 34th International Conference on Software Engineering, ICSE '12, pages 102--112, 2012.
[5]
D. Yuan, J. Zheng, S. Park, Y. Zhou, and S. Savage. Improving software diagnosability via log enhancement. In Proceedings of the Sixteenth International Conference on Architectural Support for Programming Languages and Operating Systems, ASPLOS, pages 3--14, New York, NY, USA, 2011.
[6]
J. Zhu, P. He, Q. Fu, H. Zhang, M. Lyu, and D. Zhang. Learning to log: Helping developers make informed logging decisions. In Software Engineering (ICSE), 2015 IEEE/ACM 37th IEEE International Conference on, volume 1, pages 415--425, May 2015.

Cited By

View all

Index Terms

  1. LogOpt: Static Feature Extraction from Source Code for Automated Catch Block Logging Prediction

    Recommendations

    Comments

    Information & Contributors

    Information

    Published In

    cover image ACM Other conferences
    ISEC '16: Proceedings of the 9th India Software Engineering Conference
    February 2016
    204 pages
    ISBN:9781450340182
    DOI:10.1145/2856636
    Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]

    In-Cooperation

    • iSOFT: iSOFT
    • ACM India: ACM India

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    Published: 18 February 2016

    Permissions

    Request permissions for this article.

    Check for updates

    Author Tags

    1. Debugging
    2. Logging
    3. Machine Learning
    4. Source Code Analysis
    5. Tracing

    Qualifiers

    • Research-article
    • Research
    • Refereed limited

    Conference

    ISEC '16

    Acceptance Rates

    ISEC '16 Paper Acceptance Rate 25 of 127 submissions, 20%;
    Overall Acceptance Rate 76 of 315 submissions, 24%

    Contributors

    Other Metrics

    Bibliometrics & Citations

    Bibliometrics

    Article Metrics

    • Downloads (Last 12 months)16
    • Downloads (Last 6 weeks)2
    Reflects downloads up to 08 Feb 2025

    Other Metrics

    Citations

    Cited By

    View all

    View Options

    Login options

    View options

    PDF

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    Figures

    Tables

    Media

    Share

    Share

    Share this Publication link

    Share on social media