Signed-off-by: Faumaray <faumaray@gmail.com>
This commit is contained in:
19 files changed
+579
-10
No files matched your search
@@ -0,0 +1,21 @@
|
||||
#pragma once
|
||||
#include <Logging/Sink.hpp>
|
||||
#include <memory>
|
||||
|
||||
namespace vl::logging {
|
||||
|
||||
class CombinedSink final : public Sink {
|
||||
public:
|
||||
CombinedSink(std::shared_ptr<Sink> a, std::shared_ptr<Sink> b)
|
||||
: a_(std::move(a)), b_(std::move(b)) {}
|
||||
|
||||
void write(const Message& msg) override {
|
||||
a_->write(msg);
|
||||
b_->write(msg);
|
||||
}
|
||||
|
||||
private:
|
||||
std::shared_ptr<Sink> a_, b_;
|
||||
};
|
||||
|
||||
} // namespace vl::log
|
||||
Reference in new issue
Block a user