Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

http request and response logging #62

Closed
joshuadutton opened this issue Feb 21, 2017 · 7 comments
Closed

http request and response logging #62

joshuadutton opened this issue Feb 21, 2017 · 7 comments
Assignees
Labels
enhancement Issues outlining new things we want to do or things that will make our lives as devs easier

Comments

@joshuadutton
Copy link

I would like a way to turn on logging of every http request and response for development and debug purposes.

@MaxDesiatov
Copy link
Contributor

any updates on this?

thanks.

@martijnwalraven
Copy link
Contributor

@explicitcall: No updates yet, but we're starting to discuss a more flexible network stack that would make it easy to add logging as well. If you're interested, please join #ios-core on the Apollo Slack.

@vjpr
Copy link

vjpr commented Jul 17, 2018

Bump

1 similar comment
@xzenon
Copy link

xzenon commented Jun 12, 2019

Bump

@michaelnisi
Copy link
Contributor

Try CFNetwork Diagnostic Logging for development. The CFNETWORK_DIAGNOSTICS environment variable lets you configure verbosity (0, 1, 2, or 3).

@designatednerd designatednerd self-assigned this Jun 25, 2019
@designatednerd designatednerd added the enhancement Issues outlining new things we want to do or things that will make our lives as devs easier label Jun 25, 2019
@designatednerd
Copy link
Contributor

CFNetwork Diagnostic logging as mentioned above, Charles Proxy, or MITM proxy are great workarounds until we get to this.

But yes adding this at the lib level would be real helpful.

@designatednerd
Copy link
Contributor

With the changes in 0.11.0, you should now be able to hook in to both the request as it's about to go out so you can log it and/or change it, as well as the raw response data from the URLSession. Please see the new HTTPNetworkTransportDelegate and its various sub-protocols to see where you can hook into these callbacks.

I'm gonna close this out since I think this should give anyone who wants to log these requests the information they need, and also allow them to use their logging tool of choice rather than something bolted on to Apollo. Please feel free to open new issues if you feel like there are use cases I've missed out on here!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Issues outlining new things we want to do or things that will make our lives as devs easier
Projects
None yet
Development

No branches or pull requests

7 participants