Git Product home page Git Product logo

b_log's Introduction

b_log

V0.0.1
使用接口如下:

#define log_i(...)                           /**< information log      */
#define log_w(...)                           /**< warning log          */
#define log_e(...)                           /**< error log            */
#define log_a(cond, ...)                     /**< assert log           */

主要功能:
(所有配置在b_log_config.h)

1、打印等级配置   #define B_LOG_LEVEL_CFG    B_LOG_LEVEL_I
2、每个C文件可以单独配置是否打印
   1、设置 B_LOG_CTRL_TOGETHER  0
   #define B_LOG_CTRL_TOGETHER            0
   2、在每个C文件,include "b_log.h"上面如果加了 #define B_LOG_ENABLE 那么这个C文件里的打印有效
   
3、V0.0.1不支持缓存,后面版本加入。
4、在b_log_port.c里完成一个字符打印输出即可使用
5、配置每个级别打印的额外参数:
   #define B_LOG_I_LEVEL_PARAM    (B_LOG_PARAM_NULL)  
   #define B_LOG_W_LEVEL_PARAM    (B_LOG_PARAM_FUNC | B_LOG_PARAM_LINE) 
   #define B_LOG_E_LEVEL_PARAM    (B_LOG_PARAM_FILE | B_LOG_PARAM_FUNC | B_LOG_PARAM_LINE) 
   #define B_LOG_A_LEVEL_PARAM    (B_LOG_PARAM_FILE | B_LOG_PARAM_FUNC | B_LOG_PARAM_LINE)
   可选择性打印函数名、文件名、行号
V0.0.2
增加功能:
1、支持缓存
2、增加flush接口
3、输出控制默认为统一由B_LOG_LEVEL_CFG决定,如果需要单独控制C文件里的打印,自行更改配置文件,并阅读V0.0.1功能介绍的第2条

emial: [email protected]

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.