Skip to content

Commit

Permalink
ARA_LOG now uses os_log with {public} modifier instead of fprintf to …
Browse files Browse the repository at this point in the history
…facilitate debugging AUv3 IPC
  • Loading branch information
sgretscher committed Aug 29, 2023
1 parent f77eee5 commit 4c8a916
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Debug/ARADebug.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#define vsnprintf(ptr, size, ...) do { vsprintf_s(ptr, (size) - 1, __VA_ARGS__); ptr[(size) - 1] = 0; } while (0)
#elif defined(__APPLE__)
#include <sys/sysctl.h>
#include <os/log.h>
#include <unistd.h>
#elif defined(__linux__)
#include <sys/stat.h>
Expand Down Expand Up @@ -206,8 +207,12 @@ void ARADebugMessage(ARADebugLevel level, const char * file, int line, const cha
OutputDebugStringA(output);
OutputDebugStringA("\n");
#endif
#if defined(__APPLE__)
os_log(OS_LOG_DEFAULT, "%{public}s\n", output);
#else
fprintf(stderr, "%s\n", output);
fflush(stderr);
#endif
}
#endif // ARA_ENABLE_DEBUG_OUTPUT

Expand Down

0 comments on commit 4c8a916

Please sign in to comment.