Logging is easier now, assigned in runtime group is now stored in config
This commit is contained in:
parent
7f57cd3bf6
commit
1bda854139
19 changed files with 153 additions and 53 deletions
29
shared/loggable.cpp
Normal file
29
shared/loggable.cpp
Normal 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);
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue