Core: Log messages after sending them to the app

The queueToLog() method was consuming the fields of some of the messages and the app was receiving incorrectly parsed messages.

This closes #1050