Write log files as JSON, provide API to read log files