mirror of
https://github.com/gabime/spdlog.git
synced 2025-09-29 09:59:33 +08:00
added level_t to sink. Improves the flexibility of loggers with multiple sinks
This commit is contained in:
@@ -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
|
||||
{
|
||||
|
Reference in New Issue
Block a user