Improved way to format a log as a complete JSON payload