• DocumentCode
    1606239
  • Title

    Learning to Log: Helping Developers Make Informed Logging Decisions

  • Author

    Jieming Zhu ; Pinjia He ; Qiang Fu ; Hongyu Zhang ; Lyu, Michael R. ; Dongmei Zhang

  • Author_Institution
    Shenzhen Res. Inst., Chinese Univ. of Hong Kong, Shenzhen, China
  • Volume
    1
  • fYear
    2015
  • Firstpage
    415
  • Lastpage
    425
  • Abstract
    Logging is a common programming practice of practical importance to collect system runtime information for postmortem analysis. Strategic logging placement is desired to cover necessary runtime information without incurring unintended consequences (e.g., Performance overhead, trivial logs). However, in current practice, there is a lack of rigorous specifications for developers to govern their logging behaviours. Logging has become an important yet tough decision which mostly depends on the domain knowledge of developers. To reduce the effort on making logging decisions, in this paper, we propose a "learning to log" framework, which aims to provide informative guidance on logging during development. As a proof of concept, we provide the design and implementation of a logging suggestion tool, Log Advisor, which automatically learns the common logging practices on where to log from existing logging instances and further leverages them for actionable suggestions to developers. Specifically, we identify the important factors for determining where to log and extract them as structural features, textual features, and syntactic features. Then, by applying machine learning techniques (e.g., Feature selection and classifier learning) and noise handling techniques, we achieve high accuracy of logging suggestions. We evaluate Log Advisor on two industrial software systems from Microsoft and two open-source software systems from Git Hub (totally 19.1M LOC and 100.6K logging statements). The encouraging experimental results, as well as a user study, demonstrate the feasibility and effectiveness of our logging suggestion tool. We believe our work can serve as an important first step towards the goal of "learning to log".
  • Keywords
    learning (artificial intelligence); programming; public domain software; Git Hub; Log Advisor logging suggestion tool; Microsoft; industrial software systems; learning-to-log framework; logging decisions; logging programming practice; logging suggestions; machine learning techniques; noise handling techniques; open-source software systems; postmortem analysis; strategic logging placement; system runtime information; Context; Data mining; Feature extraction; Runtime; Software systems; Syntactics;
  • fLanguage
    English
  • Publisher
    ieee
  • Conference_Titel
    Software Engineering (ICSE), 2015 IEEE/ACM 37th IEEE International Conference on
  • Conference_Location
    Florence
  • Type

    conf

  • DOI
    10.1109/ICSE.2015.60
  • Filename
    7194593