added level_t to sink. Improves the flexibility of loggers with multiple sinks

This commit is contained in:
davide
2016-09-12 22:26:38 +02:00
parent c69df8ae44
commit b67076fc85
5 changed files with 41 additions and 8 deletions

View File

@@ -35,11 +35,13 @@ protected:
void _sink_it(const details::log_msg& msg) override
{
for (auto &sink : _sinks)
sink->log(msg);
for (auto &sink : _sinks){
if( sink->should_log( msg.level)){
sink->log(msg);
}
}
}
public:
void flush() override
{