25 lines
858 B
C++
25 lines
858 B
C++
#pragma once
|
|
#include <Logging/Logger.hpp>
|
|
#include <cstdint>
|
|
#include <memory>
|
|
#include <string>
|
|
#include <string_view>
|
|
|
|
namespace vl::logging {
|
|
|
|
struct Provider {
|
|
virtual ~Provider() = default;
|
|
|
|
// P3: get-or-create
|
|
virtual std::shared_ptr<Logger> createConsole(std::string prefix, Level lvl) = 0;
|
|
virtual std::shared_ptr<Logger> createFile(std::string prefix, std::string basePath,
|
|
std::uintmax_t maxBytes, Level lvl) = 0;
|
|
virtual std::shared_ptr<Logger> createCombined(std::string prefix, std::string basePath,
|
|
std::uintmax_t maxBytes, Level lvl) = 0;
|
|
|
|
virtual std::shared_ptr<Logger> get(std::string_view prefix) const = 0; // throws if absent
|
|
virtual bool exists(std::string_view prefix) const = 0;
|
|
};
|
|
|
|
} // namespace vl::log
|