This commit is contained in:
CupWater
2026-08-17 09:28:06 +08:00
parent ee4fa58544
commit d54d2fcff5
9 changed files with 321 additions and 1 deletions
+27
View File
@@ -0,0 +1,27 @@
#ifndef FEATHERLOG_LOG_OUTPUTER_HPP
#define FEATHERLOG_LOG_OUTPUTER_HPP
#include <memory>
#include <string>
#include "log_formatter.hpp"
#include "log_message.hpp"
namespace flog
{
class LogOutputter
{
public:
virtual ~LogOutputter() = default;
std::unique_ptr<LogFormatter> set_formatter(const std::unique_ptr<LogFormatter>& formatter);
std::unique_ptr<LogFormatter>& get_formatter();
virtual void write(const LogMessage& message) = 0;
protected:
std::unique_ptr<LogFormatter> m_logFormatter;
};
}
#endif