Logging is easier now, assigned in runtime group is now stored in config

This commit is contained in:
Blue 2025-03-17 17:13:52 +02:00
parent 7f57cd3bf6
commit 1bda854139
Signed by: blue
GPG key ID: 9B203B252A63EE38
19 changed files with 153 additions and 53 deletions

29
shared/loggable.cpp Normal file
View file

@ -0,0 +1,29 @@
// 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);
}