![9cd3bd0a8f429be53ea9171c79ad3271.png](https://img-blog.csdnimg.cn/img_convert/9cd3bd0a8f429be53ea9171c79ad3271.png)
easyloggingpp
github地址:https://github.com/amrayn/easyloggingpp
gitee地址:https://gitee.com/yingge2017/easyloggingpp
是一个开源的C++日志库。库只有两个源文件,相比较log4cpp和glog等日志库来说更加轻便,不用预先编译,但是功能满足日常使用。
目前最新的版本是 v9.96.7 支持C++容器,C++11语法,支持配置文件而且增加了Qt数据文本的支持。
在代码中使用
#include "mainwindow.h"
#include "easylogging++.h"
//初始化
INITIALIZE_EASYLOGGINGPP
int main(int argc, char *argv[]){
el::Configurations conf("log.conf");
el::Loggers::reconfigureAllLoggers(conf);
LOG(ERROR) << "-----error log";
LOG(WARNING) << "-----war