output json logs, support logging response as well