Commit cfb450c0 authored by gabime's avatar gabime

Fixed eol write in pattern_formatter_impl

parent b416685d
......@@ -26,8 +26,17 @@ int main(int, char *[])
{
try
{
spdlog::set_async_mode(1024);
// Console logger with color
auto console = spd::stdout_color_mt("console");
for (int i = 0; i < 2000; i++)
{
console->info("{} Hello thread pool!", i);
}
return 0;
console->info("Welcome to spdlog!");
console->error("Some error message with arg{}..", 1);
......@@ -39,6 +48,7 @@ int main(int, char *[])
console->info("{:<30}", "left aligned");
spd::get("console")->info("loggers can be retrieved from a global registry using the spdlog::get(logger_name) function");
return 0;
// Create basic file logger (not rotated)
auto my_logger = spd::basic_logger_mt("basic_logger", "logs/basic-log.txt");
......
......@@ -704,5 +704,5 @@ inline void spdlog::pattern_formatter::format(details::log_msg &msg)
f->format(msg, tm_time);
}
// write eol
msg.formatted.write(_eol.data(), _eol.size());
msg.formatted << _eol;
}
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment