mirror of
https://github.com/gabime/spdlog.git
synced 2025-01-13 09:20:25 +08:00
Merge pull request #289 from thomas-frantz/expose_sinks
Exposed logger sinks.
This commit is contained in:
commit
fa175d6300
@ -291,3 +291,8 @@ inline bool spdlog::logger::_should_flush_on(const details::log_msg &msg)
|
|||||||
const auto flush_level = _flush_level.load(std::memory_order_relaxed);
|
const auto flush_level = _flush_level.load(std::memory_order_relaxed);
|
||||||
return (msg.level >= flush_level) && (msg.level != level::off);
|
return (msg.level >= flush_level) && (msg.level != level::off);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
inline const std::vector<spdlog::sink_ptr>& spdlog::logger::sinks() const
|
||||||
|
{
|
||||||
|
return _sinks;
|
||||||
|
}
|
||||||
|
@ -68,6 +68,8 @@ public:
|
|||||||
|
|
||||||
virtual void flush();
|
virtual void flush();
|
||||||
|
|
||||||
|
const std::vector<sink_ptr>& sinks() const;
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual void _sink_it(details::log_msg&);
|
virtual void _sink_it(details::log_msg&);
|
||||||
virtual void _set_pattern(const std::string&);
|
virtual void _set_pattern(const std::string&);
|
||||||
@ -90,5 +92,3 @@ protected:
|
|||||||
}
|
}
|
||||||
|
|
||||||
#include <spdlog/details/logger_impl.h>
|
#include <spdlog/details/logger_impl.h>
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user