Skip to content

Latest commit

 

History

History
31 lines (27 loc) · 1.11 KB

README.md

File metadata and controls

31 lines (27 loc) · 1.11 KB

debug_print

Linux: x86_64 Build Status Coverage Status

Purpose

Use code to demo a color print function for debug use, meanwhile, show how to setup a easy development way under Linux with VIM, makefile and shell script

  1. study how to impelmente debug print method under Linux
  2. study makefile
  3. study coding with vim/cscope/YCM

Feature

  1. split print to different module, easy to filter
  2. colored print, easy to identify
  3. leveled print, easy to control

TODO

  1. Automatically detect OS arch in Makefile
  2. Delivery debug print function as a LIB
  3. Optimize code

How to use

1. Display Debug output

  • make DEBUG=YES && make test or
  • ./post_test.sh DEBUG=YES

2. Perform code coverage

make DEBUG=YES && make test && make testcov

3. Remove debug print

  • just remove DEBUG=YES during make, or
  • configure in code by function DbgConfig(group, level)