using simple filesink in spdlog bench

This commit is contained in:
gabime 2014-12-20 18:59:37 +02:00
parent 64ecfda6e3
commit da0f0b554e

View File

@ -4,7 +4,7 @@
#include "spdlog/spdlog.h"
#include <iostream>
using namespace std;
int main(int argc, char* argv[])
@ -17,8 +17,8 @@ int main(int argc, char* argv[])
int howmany = 1000000;
namespace spd = spdlog;
///Create a file rotating logger with 10mb size max and 5 rotated files
auto logger = spd::rotating_logger_mt("file_logger", "logs/spd-sample", 10 *1024 * 1024 , 5, false);
auto logger = spdlog::create<spd::sinks::simple_file_sink_mt>("file_logger", "logs/spd-bench-mt.txt", false);
logger->set_pattern("[%Y-%b-%d %T.%e]: %v");