- 简介
参考了 ffmpeg中的日志打印,实现了 printf的彩色输出,Log.cpp 和Log.h文件。
下载链接 https://download.csdn.net/download/ahnulp/10589040
效果如下。
- 调用代码如下
CWriteLog("main",LOG_DEBUG,"---log_debug---\n");
CWriteLog("main",LOG_ERROR,"---log_error---\n");
CWriteLog("main",LOG_SUC,"---log_success---\n");
CWriteLog("main",LOG_WARNING,"---log_warning---\n");
CWriteLog("",LOG_DEBUG,"---log_debug---\n");
CWriteLog("",LOG_ERROR,"---log_error---\n");
CWriteLog("",LOG_SUC,"---log_success---\n");
CWriteLog("",LOG_WARNING,"---log_warning---\n");