[core] Put stack traces to log