mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-30 02:19:35 +08:00
Removed close() from sink to have RAII semantics
This commit is contained in:
@@ -112,7 +112,6 @@ void bench(int howmany, std::shared_ptr<spdlog::logger> log)
|
||||
auto delta = system_clock::now() - start;
|
||||
auto delta_d = duration_cast<duration<double>> (delta).count();
|
||||
cout << format(int(howmany / delta_d)) << "/sec" << endl;
|
||||
log->close();
|
||||
}
|
||||
|
||||
|
||||
@@ -146,6 +145,5 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> log, int thread_count
|
||||
auto delta = system_clock::now() - start;
|
||||
auto delta_d = duration_cast<duration<double>> (delta).count();
|
||||
cout << format(int(howmany / delta_d)) << "/sec" << endl;
|
||||
log->close();
|
||||
}
|
||||
|
||||
|
@@ -29,7 +29,7 @@
|
||||
#include "spdlog/spdlog.h"
|
||||
|
||||
|
||||
int main(int, char* [])
|
||||
int maina(int, char* [])
|
||||
{
|
||||
|
||||
namespace spd = spdlog;
|
||||
|
Reference in New Issue
Block a user