Zappy Server
C++ game server: world, rules, scheduler, network
Loading...
Searching...
No Matches
CompositeSink.cpp
Go to the documentation of this file.
2
3void CompositeSink::add(std::unique_ptr<ILogSink> sink) { _sinks.push_back(std::move(sink)); }
4
5void CompositeSink::write(LogLevel level, const std::string& line)
6{
7 for (auto& sink : _sinks) sink->write(level, line);
8}
LogLevel
Definition ILogSink.hpp:5
std::vector< std::unique_ptr< ILogSink > > _sinks
void write(LogLevel level, const std::string &line) override
Write one already-formatted line if level passes the sink's threshold.
void add(std::unique_ptr< ILogSink > sink)