// SPDX-FileCopyrightText: 2024 Yury Gubich // SPDX-License-Identifier: GPL-3.0-or-later #pragma once #include #include #include namespace Shared { class Logger: public gloox::LogHandler { public: enum Level { trace, debug, info, warning, error, fatal }; public: Logger(Level level = info); ~Logger(); void handleLog(gloox::LogLevel level, gloox::LogArea area, const std::string& message) override; void log(Level level, const std::string& message, const std::vector& domain = {}) const; static gloox::LogLevel convert(Level level); static Level convert(gloox::LogLevel level); private: Level level; }; }