#pragma once #include #include #include #include #include #include namespace vl::logging { class LoggerProvider final : public Provider { public: std::shared_ptr createConsole(std::string prefix, Level lvl) override; std::shared_ptr createFile(std::string prefix, std::string basePath, std::uintmax_t maxBytes, Level lvl) override; std::shared_ptr createCombined(std::string prefix, std::string basePath, std::uintmax_t maxBytes, Level lvl) override; std::shared_ptr get(std::string_view prefix) const override; bool exists(std::string_view prefix) const override; private: std::shared_ptr emplaceOrGet_(std::string prefix, std::shared_ptr sink, Level lvl); mutable std::mutex mtx_; std::unordered_map> byPrefix_; }; } // namespace vl::log