26 lines
662 B
C++
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;
|
|
};
|