This makes it so any messages output to the UI *after* the agent has started will be logged in json format correctly