Stringifying log message to have useful content when message is a JavaScript object