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 2016Publication 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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library
  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. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

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

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in
    • 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

      Copyright © 2016 ACM

      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]

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 18 February 2016

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article
      • Research
      • Refereed limited

      Acceptance Rates

      ISEC '16 Paper Acceptance Rate25of127submissions,20%Overall Acceptance Rate76of315submissions,24%

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader