mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
Small changes
This commit is contained in:
@@ -20,14 +20,14 @@ int main(int argc, char* argv[])
|
||||
|
||||
const unsigned int howmany = argc <= 1 ? 10000 : atoi(argv[1]);
|
||||
|
||||
logger cout_logger("example", std::make_shared<sinks::stderr_sink_st>());
|
||||
logger cout_logger("example", std::make_shared<sinks::stderr_sink_mt>());
|
||||
cout_logger.info() << "Hello logger";
|
||||
|
||||
//auto nullsink = std::make_shared<sinks::null_sink<std::mutex>>();
|
||||
//auto nullsink = std::make_shared<sinks::null_sink<details::null_mutex>>();
|
||||
auto fsink = std::make_shared<sinks::rotating_file_sink_mt>("log", "txt", 1024*1024*50 , 5, 1);
|
||||
//auto as = std::make_shared<sinks::async_sink>(1000);
|
||||
//as->add_sink(fsink);
|
||||
auto nullsink = std::make_shared<sinks::null_sink<details::null_mutex>>();
|
||||
auto fsink = std::make_shared<sinks::rotating_file_sink_st>("log", "txt", 1024*1024*50 , 5, 10);
|
||||
auto as = std::make_shared<sinks::async_sink>(1000);
|
||||
|
||||
|
||||
logger my_logger("my_logger", fsink);
|
||||
|
||||
@@ -36,7 +36,7 @@ int main(int argc, char* argv[])
|
||||
for (unsigned int i = 1; i <= howmany; ++i)
|
||||
my_logger.info() << "Hello logger: msg #" << i;
|
||||
|
||||
//as->shutdown(std::chrono::milliseconds(15000));
|
||||
|
||||
auto delta = system_clock::now() - start;
|
||||
auto delta_d = duration_cast<duration<double>> (delta).count();
|
||||
|
||||
|
Reference in New Issue
Block a user