20 lines
468 B
C
20 lines
468 B
C
|
// SPDX-FileCopyrightText: 2024 Yury Gubich <blue@macaw.me>
|
||
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
||
|
|
||
|
#pragma once
|
||
|
|
||
|
#include <gloox/loghandler.h>
|
||
|
#include <gloox/logsink.h>
|
||
|
|
||
|
class Logger : public gloox::LogHandler {
|
||
|
public:
|
||
|
Logger(gloox::LogSink& sink, gloox::LogLevel level);
|
||
|
~Logger();
|
||
|
|
||
|
void handleLog(gloox::LogLevel level, gloox::LogArea area, const std::string& message) override;
|
||
|
|
||
|
private:
|
||
|
gloox::LogSink& sink;
|
||
|
gloox::LogLevel level;
|
||
|
};
|