Adding API to return json with logger data. Necessary for collector.