Hi,
I have written some native code unity plugins and need to print debugging info to the console/logs.
On android, for debug logging I used:
#define DEBUG_LOG_FMT(fmt, ...) \
do { \
static char buf[4096]; \
sprintf(buf, fmt, ##__VA_ARGS__); \
__android_log_print(ANDROID_LOG_INFO, LOG_TAG, "%s(%d): %s
", FILE, LINE, buf);
} while (0)
and my debug info showed up in the unity logs.
Now I am testing my plugin for OSX and for debug logging I am using:
#define DEBUG_LOG_FMT(fmt, ...) \
do { \
static char buf[4096]; \
sprintf(buf, fmt, ##__VA_ARGS__); \
std::string str("%s(%d): %s
");
printf(str.c_str(), FILE, LINE, buf);
} while (0)
but my debug info does not show up in the unity logs / console.
How do you print to the unity console from native code on OSX and get it to show up in the logs ?