Simplified sink interface - to just accept char* and size_t

This commit is contained in:
gabi
2014-11-21 00:13:24 +02:00
parent a9abfbb005
commit 66039c7c0e
8 changed files with 60 additions and 54 deletions

View File

@@ -184,7 +184,8 @@ inline void spdlog::logger::_variadic_log(spdlog::details::line_logger& l, const
inline void spdlog::logger::_log_msg(details::log_msg& msg)
{
_formatter->format(msg);
auto buf = msg.formatted.buf();
for (auto &sink : _sinks)
sink->log(msg);
sink->sink_it(buf.data(), buf.size());
}