Giter VIP home page Giter VIP logo

smartlog's Introduction

SmartLog

A Semantic-Aware Log Automation Tool for Failure Diagnosis.


Introduction

SmartLog is a log automation tool. Through learning logging rules from existing logs, SmartLog can decide whether to log a given code snippet or not , and finally inserts logging statement when necessary.

Usage

Compile
  • Change directory to Clang tools directory.
cd path/to/llvm-source-tree/tools/clang/tools
  • Download source code.
git clone https://github.com/ZhouyangJia/SmartLog.git
  • Add add_subdirectory(SmartLog) to CMakeList.txt.
echo "add_subdirectory(SmartLog)" >> CMakeLists.txt
ls path/to/llvm-build/Release/bin/clang-smartlog
Run
cd test/
tar zxvf bftpd-3.2.tar
cd bftpd/
./configure
bear make
  • Generate compiled_files.def, This file has all names of compiled source files.
../../script/extract_command.pl compile_commands.json
  • Generate call dependence before running SmartLog (Compiler CallDependence tool first).
../../script/call_dependence.sh
  • Generate logging_statement.out, logging_behavior.out, normalizes_behavior.out and logging_rules.out.
cat compiled_files.def | xargs clang-smartlog -find-logging-behavior > logging_rules.out

logging_statement.out. The logging statements, including function name and call location.

logging_behavior.out. The logging behavior, including error-prone function name, function call expression, function call location, argument index, log type (SA for sensitive argement, RV for return value and PA for pointer argument), check condition, check location, logging statement, log approach (LL for local log, RL for remote log and NL for no log), log location.

normalizes_behavior.out. The normalized behavior, including error-prone function name, argument index, log type, normalized check condition, log approach.

  • Generate patches.
python ../../script/patch.py > patch.out

smartlog's People

Contributors

zhouyangjia avatar

Watchers

James Cloos avatar Aiden Porter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.