summaryrefslogtreecommitdiff
path: root/src/protocols/WaylandProtocol.hpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2024-04-22 18:44:25 +0100
committerVaxry <vaxry@vaxry.net>2024-04-22 18:44:25 +0100
commit012a2802e00a7b34e47c8c1098dc093031044ce9 (patch)
treea72083d065f243a67dabbfaa704f026d501ee655 /src/protocols/WaylandProtocol.hpp
parent741c75d907916d760163f910e65186d410e27874 (diff)
Protocols: implement protoLog
Diffstat (limited to 'src/protocols/WaylandProtocol.hpp')
-rw-r--r--src/protocols/WaylandProtocol.hpp6
1 files changed, 6 insertions, 0 deletions
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 <typename... Args>
+ void protoLog(LogLevel level, std::format_string<Args...> 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