26#include "singleton.hpp"
27#include "log/writer.hpp"
41 using CreateWriter = std::function<anch::log::Writer*(bool, bool,
const anch::conf::Section&)>;
58 std::map<std::string, anch::log::CreateWriter> _registry;
61 std::map<std::string, anch::log::Writer*> _writers;
92 virtual ~WriterRegistry();
103 void registerWriter(
const std::string& name,
const anch::log::CreateWriter& writerBuilder);
127 const anch::conf::Section& section);
134#include "log/impl/writerRegistry.hpp"
Meyers' singleton implementation.
Definition singleton.hpp:34
Logger writter definition.
Definition writer.hpp:38
WriterRegistry(WriterRegistry &&other)=delete
void registerWriter(const std::string &name, const anch::log::CreateWriter &writerBuilder)
anch::log::Writer * create(const std::string &name, bool threadSafe, bool lowPriority, const anch::conf::Section §ion)
bool contains(const std::string &name) const
WriterRegistry(const WriterRegistry &other)=delete