Fix clang-tidy warnings about missing braces around if and for statements

This commit is contained in:
gabime
2018-03-17 13:42:09 +02:00
parent 7eb6ca6337
commit 200815892f
10 changed files with 118 additions and 0 deletions

View File

@@ -47,7 +47,9 @@ int main(int, char *[])
// Create a file rotating logger with 5mb size max and 3 rotated files
auto rotating_logger = spd::rotating_logger_mt("some_logger_name", "logs/rotating.txt", 1048576 * 5, 3);
for (int i = 0; i < 10; ++i)
{
rotating_logger->info("{} * {} equals {:>10}", i, i, i * i);
}
// Create a daily logger - a new file is created every day on 2:30am
auto daily_logger = spd::daily_logger_mt("daily_logger", "logs/daily.txt", 2, 30);
@@ -106,7 +108,9 @@ void async_example()
spdlog::set_async_mode(q_size);
auto async_file = spd::daily_logger_st("async_file_logger", "logs/async_log.txt");
for (int i = 0; i < 100; ++i)
{
async_file->info("Async message #{}", i);
}
}
// syslog example (linux/osx/freebsd)