1、在 https://github.com/gabime/spdlog 处下载源文件;
2、下载后解压,将得到以下文件,其中include文件夹里是所需的头文件及源码;
3、新建一个C++控制台应用程序项目...logs/rotating.txt", 1048576 * 5, 3);
int main(int, char *[])
{
int a, b;
a = 5;
b = 3;
float c...;
rotating_logger->info("a = {},b={},a/b={},a%b={}", a, b, a/b,a%b);
rotating_logger->info("c = {},...s = {} ", c, s);
rotating_logger->flush();
system("pause");
return 1;
}
5、在源.cpp同级目录下创建logs文件夹
6