Skip to content

Commit 4c8a916

Browse files
committed
ARA_LOG now uses os_log with {public} modifier instead of fprintf to facilitate debugging AUv3 IPC
1 parent f77eee5 commit 4c8a916

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

Debug/ARADebug.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#define vsnprintf(ptr, size, ...) do { vsprintf_s(ptr, (size) - 1, __VA_ARGS__); ptr[(size) - 1] = 0; } while (0)
3333
#elif defined(__APPLE__)
3434
#include <sys/sysctl.h>
35+
#include <os/log.h>
3536
#include <unistd.h>
3637
#elif defined(__linux__)
3738
#include <sys/stat.h>
@@ -206,8 +207,12 @@ void ARADebugMessage(ARADebugLevel level, const char * file, int line, const cha
206207
OutputDebugStringA(output);
207208
OutputDebugStringA("\n");
208209
#endif
210+
#if defined(__APPLE__)
211+
os_log(OS_LOG_DEFAULT, "%{public}s\n", output);
212+
#else
209213
fprintf(stderr, "%s\n", output);
210214
fflush(stderr);
215+
#endif
211216
}
212217
#endif // ARA_ENABLE_DEBUG_OUTPUT
213218

0 commit comments

Comments
 (0)