How to print callstack into log?

Supposing the PDBs are loaded, you could look at / trace FWindwsPlatformStackWalk::StackWalkAndDump – for other platforms there are other classes, each implements StackWalkAndDump.

That’s what the crash reporter uses for the call stack.