Переглянути джерело

emscripten: log to stdout instead of stderr.

legacy
Sam Hocevar 5 роки тому
джерело
коміт
acb4624084
1 змінених файлів з 4 додано та 0 видалено
  1. +4
    -0
      src/base/log.cpp

+ 4
- 0
src/base/log.cpp Переглянути файл

@@ -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);


Завантаження…
Відмінити
Зберегти