|
|
@ -120,13 +120,13 @@ TEST_CASE("to_file", "[async]")
|
|
|
|
|
|
|
|
|
|
|
|
REQUIRE(count_lines(filename) == messages);
|
|
|
|
REQUIRE(count_lines(filename) == messages);
|
|
|
|
auto contents = file_contents(filename);
|
|
|
|
auto contents = file_contents(filename);
|
|
|
|
REQUIRE(ends_with (contents, std::string("Hello message #1023") + SPDLOG_EOL));
|
|
|
|
REQUIRE(ends_with(contents, std::string("Hello message #1023") + SPDLOG_EOL));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
TEST_CASE("to_file multi-workers", "[async]")
|
|
|
|
TEST_CASE("to_file multi-workers", "[async]")
|
|
|
|
{
|
|
|
|
{
|
|
|
|
prepare_logdir();
|
|
|
|
prepare_logdir();
|
|
|
|
size_t messages = 1024*10;
|
|
|
|
size_t messages = 1024 * 10;
|
|
|
|
size_t tp_threads = 10;
|
|
|
|
size_t tp_threads = 10;
|
|
|
|
std::string filename = "logs/async_test.log";
|
|
|
|
std::string filename = "logs/async_test.log";
|
|
|
|
{
|
|
|
|
{
|
|
|
|