Files
FeatherLog/include/featherlog/log_outputter.hpp
T
2026-08-17 11:29:05 +08:00

26 lines
556 B
C++

#ifndef FEATHERLOG_LOG_OUTPUTTER_HPP
#define FEATHERLOG_LOG_OUTPUTTER_HPP
#include <memory>
#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