Protocols: implement protoLog

This commit is contained in:
Vaxry 2024-04-22 18:44:25 +01:00
parent 741c75d907
commit 012a2802e0
10 changed files with 84 additions and 45 deletions

View file

@ -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;
};