From 9ddc65d4e5f60800d0afb77fe86355b56e36336e Mon Sep 17 00:00:00 2001 From: kalwalt Date: Thu, 21 Dec 2023 00:47:15 +0100 Subject: [PATCH] fix for issue https://github.com/webarkit/jsartoolkitNFT/issues/364 --- lib/SRC/ARUtil/log.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/lib/SRC/ARUtil/log.c b/lib/SRC/ARUtil/log.c index 66e4337..9e58741 100644 --- a/lib/SRC/ARUtil/log.c +++ b/lib/SRC/ARUtil/log.c @@ -201,7 +201,16 @@ void arLogv(const char *tag, const int logLevel, const char *format, va_list ap) os_log_with_type(OS_LOG_DEFAULT, type, "%{public}s", buf); } #else + +#ifdef __EMSCRIPTEN__ + if(logLevel == AR_LOG_LEVEL_ERROR) + fprintf(stderr, "%s", buf); + else + fprintf(stdout, "%s", buf); +#else fprintf(stderr, "%s", buf); +#endif + #endif } free(buf);