12 files changed
+286
-15
No files matched your search
@@ -0,0 +1,24 @@
|
||||
#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
|
||||
Reference in new issue
Block a user