Slaving Tools that Log

Any tool that creates the Context instance (which is a prerequisite for the Log subsystem to exist) should result in Thread::SetMainThread() being called. Is this not working? What is the system call you’re using to spawn the tool?

This might be worth trying, which rather sets the console codepage and uses wprintf: … onsole-app

Ideally strings should always be interpreted as unicode when printed to console and there should not be a separate function for that. On Unix PrintLine() & PrintUnicodeLine() already map to the same system call.

Trying to get sensible Unicode output on Windows through functions that are also capable of redirecting to a file seemed like an endless pit. Therefore it now simply detects whether stdout / stderr is redirected, and uses fprintf() in that case.