mason/src2/loggable.h
2023-09-25 17:15:24 -03:00

26 lines
662 B
C++

#pragma once
#include <memory>
#include "loggger.h"
class Loggable {
public:
explicit Loggable(const std::shared_ptr<Logger>& logger);
virtual ~Loggable() = default;
void debug(const std::string& message) const;
void info(const std::string& message) const;
void minor(const std::string& message) const;
void major(const std::string& message) const;
void warn(const std::string& message) const;
void error(const std::string& message) const;
void fatal(const std::string& message) const;
private:
void log(Logger::Severity severity, const std::string& message) const;
protected:
std::shared_ptr<Logger> logger;
};