mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-28 17:19:34 +08:00
astyle
This commit is contained in:
@@ -32,7 +32,8 @@ int main(int argc, char* argv[])
|
||||
int file_size = 30 * 1024 * 1024;
|
||||
int rotating_files = 5;
|
||||
|
||||
try {
|
||||
try
|
||||
{
|
||||
|
||||
if(argc > 1)
|
||||
howmany = atoi(argv[1]);
|
||||
@@ -49,7 +50,7 @@ int main(int argc, char* argv[])
|
||||
|
||||
auto daily_st = spdlog::daily_logger_st("daily_st", "logs/daily_st", flush_interval);
|
||||
bench(howmany, daily_st);
|
||||
|
||||
|
||||
bench(howmany, spdlog::create<null_sink_st>("null_st"));
|
||||
|
||||
cout << "\n*******************************************************************************\n";
|
||||
@@ -100,7 +101,8 @@ void bench_mt(int howmany, std::shared_ptr<spdlog::logger> log, int thread_count
|
||||
auto start = system_clock::now();
|
||||
for (int t = 0; t < thread_count; ++t)
|
||||
{
|
||||
threads.push_back(std::thread([&]() {
|
||||
threads.push_back(std::thread([&]()
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
int counter = ++msg_counter;
|
||||
|
@@ -31,10 +31,11 @@ int main(int, char* [])
|
||||
spd::set_level(spd::level::WARN);
|
||||
console->info("This should not be displayed");
|
||||
console->warn("This should!");
|
||||
spd::set_level(spd::level::INFO);
|
||||
|
||||
// Change format pattern to all loggers
|
||||
spd::set_pattern(" **** %Y-%m-%d %H:%M:%S.%e %l **** %v");
|
||||
spd::get("console")->warn("This is another message with different format");
|
||||
spd::get("console")->info("This is another message with different format");
|
||||
}
|
||||
catch (const spd::spdlog_ex& ex)
|
||||
{
|
||||
|
Reference in New Issue
Block a user