From 012a2802e00a7b34e47c8c1098dc093031044ce9 Mon Sep 17 00:00:00 2001 From: Vaxry Date: Mon, 22 Apr 2024 18:44:25 +0100 Subject: Protocols: implement protoLog --- src/protocols/WaylandProtocol.hpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/protocols/WaylandProtocol.hpp') diff --git a/src/protocols/WaylandProtocol.hpp b/src/protocols/WaylandProtocol.hpp index d23a0e48..b0a33900 100644 --- a/src/protocols/WaylandProtocol.hpp +++ b/src/protocols/WaylandProtocol.hpp @@ -24,7 +24,13 @@ class IWaylandProtocol { virtual void bindManager(wl_client* client, void* data, uint32_t ver, uint32_t id) = 0; + template + void protoLog(LogLevel level, std::format_string fmt, Args&&... args) { + Debug::log(level, std::format("[{}] ", m_szName) + std::vformat(fmt.get(), std::make_format_args(args...))); + }; + private: + std::string m_szName; wl_global* m_pGlobal = nullptr; wl_listener m_liDisplayDestroy; }; \ No newline at end of file -- cgit v1.2.3