Browse Source

emscripten: log to stdout instead of stderr.

legacy
Sam Hocevar 5 years ago
parent
commit
acb4624084
1 changed files with 4 additions and 0 deletions
  1. +4
    -0
      src/base/log.cpp

+ 4
- 0
src/base/log.cpp View File

@@ -113,6 +113,10 @@ void msg::helper(MessageType type, char const *fmt, va_list ap)
widechar.resize(buf.length() + 1);
MultiByteToWideChar(CP_UTF8, 0, buf.c_str(), (int)buf.length() + 1, widechar.data(), widechar.count());
OutputDebugStringW(widechar.data());
# elif defined __EMSCRIPTEN__
fprintf(stdout, "%s: ", prefix[(int)type]);
vfprintf(stdout, fmt, ap);
fflush(stdout);
# else
fprintf(stderr, "%s: ", prefix[(int)type]);
vfprintf(stderr, fmt, ap);


Loading…
Cancel
Save