1
0
Эх сурвалжийг харах

mac-virtualcam: Hide logging behind debug flag

Hides the DLog and DLogFunc macros behind the -DDEBUG flag, causing the
logs to only appear in testing environments.

On production build, calls to these macros will result in nothing
happening.
gxalpha 4 жил өмнө
parent
commit
5708e64d11

+ 6 - 0
plugins/mac-virtualcam/src/dal-plugin/Logging.h

@@ -22,9 +22,15 @@
 
 #include "Defines.h"
 
+#ifdef DEBUG
 #define DLog(fmt, ...) NSLog((PLUGIN_NAME @"(DAL): " fmt), ##__VA_ARGS__)
 #define DLogFunc(fmt, ...) \
 	NSLog((PLUGIN_NAME @"(DAL): %s " fmt), __FUNCTION__, ##__VA_ARGS__)
+#else
+#define DLog(fmt, ...) (void)(fmt, ##__VA_ARGS__)
+#define DLogFunc(fmt, ...) (void)(fmt, __FUNCTION__, ##__VA_ARGS__)
+#endif
+
 #define VLog(fmt, ...)
 #define VLogFunc(fmt, ...)
 #define ELog(fmt, ...) DLog(fmt, ##__VA_ARGS__)