From 60f12a16f3516d505e4e0564a4904736732cd2a5 Mon Sep 17 00:00:00 2001 From: tt2468 Date: Sat, 20 Nov 2021 01:31:03 -0800 Subject: [PATCH] plugin-macros: Add blog_debug() obs-studio's LOG_DEBUG setting only works in very specific circumstances, which is why we implement our own debug logging. This will help a lot of code cleanup. --- src/plugin-macros.h.in | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/plugin-macros.h.in b/src/plugin-macros.h.in index 822cb385..2523d4d4 100644 --- a/src/plugin-macros.h.in +++ b/src/plugin-macros.h.in @@ -22,6 +22,8 @@ with this program. If not, see #include #define blog(level, msg, ...) blog(level, "[obs-websocket] " msg, ##__VA_ARGS__) +#define blog_debug(msg, ...) if (IsDebugEnabled()) blog(LOG_INFO, "[obs-websocket] [debug] " msg, ##__VA_ARGS__) + #define OBS_WEBSOCKET_VERSION "@OBS_WEBSOCKET_VERSION@" #define OBS_WEBSOCKET_RPC_VERSION @OBS_WEBSOCKET_RPC_VERSION@