jay/shared/loggable.cpp

30 lines
841 B
C++

// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
// SPDX-License-Identifier: GPL-3.0-or-later
#include "loggable.h"
Shared::Loggable::Loggable(const Logger& logger, const std::vector<std::string>& domain) :
logger(logger),
domain(domain)
{}
void Shared::Loggable::trace(const std::string& message) const {
logger.log(Logger::trace, message, domain);
}
void Shared::Loggable::debug(const std::string& message) const {
logger.log(Logger::debug, message, domain);
}
void Shared::Loggable::info(const std::string& message) const {
logger.log(Logger::info, message, domain);
}
void Shared::Loggable::warn(const std::string& message) const {
logger.log(Logger::warning, message, domain);
}
void Shared::Loggable::error(const std::string& message) const {
logger.log(Logger::error, message, domain);
}