OSSIA
Open Scenario System for Interactive Application
Loading...
Searching...
No Matches
qt_logger.hpp
1#pragma once
3
4#include <QMetaType>
5#include <QObject>
6
7#include <spdlog/sinks/sink.h>
8
9#include <verdigris>
10
11Q_DECLARE_METATYPE(spdlog::level::level_enum)
12W_REGISTER_ARGTYPE(spdlog::level::level_enum)
13
14namespace ossia::qt
15{
17class OSSIA_EXPORT log_sink final
18 : public QObject
19 , public spdlog::sinks::sink
20{
21 W_OBJECT(log_sink)
22
23public:
24 log_sink() = default;
25 ~log_sink() override;
26
27 void set_pattern(const std::string& pattern) override { }
28 void set_formatter(std::unique_ptr<spdlog::formatter> sink_formatter) override { }
29 void log(const spdlog::details::log_msg& msg) override;
30
31 void flush() override { }
32};
33}
Converts log messages from spdlog to Qt signals.
Definition qt_logger.hpp:20