jay/shared/loggable.h
2025-04-12 13:12:38 +03:00

30 lines
705 B
C++

// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#pragma once
#include <string>
#include <vector>
#include "logger.h"
namespace Shared {
class Loggable {
public:
Loggable(const Logger& logger, const std::vector<std::string>& domain = {"Unknown"});
private:
const Logger& logger;
std::vector<std::string> domain;
protected:
void trace(const std::string& message) const;
void debug(const std::string& message) const;
void info(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;
};
}