diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-04-22 18:44:25 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-04-22 18:44:25 +0100 |
| commit | 012a2802e00a7b34e47c8c1098dc093031044ce9 (patch) | |
| tree | a72083d065f243a67dabbfaa704f026d501ee655 /src/protocols/WaylandProtocol.hpp | |
| parent | 741c75d907916d760163f910e65186d410e27874 (diff) | |
Protocols: implement protoLog
Diffstat (limited to 'src/protocols/WaylandProtocol.hpp')
| -rw-r--r-- | src/protocols/WaylandProtocol.hpp | 6 |
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 |
