VoidLoader/VoidLoaderCore/pipeline/head There was a failure building this commit
Signed-off-by: Faumaray <faumaray@gmail.com>
22 lines
421 B
C++
22 lines
421 B
C++
#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
|