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

Add HTTP request as well as response logging #2

Merged
merged 2 commits into from
Aug 17, 2016

Conversation

jjulian
Copy link
Collaborator

@jjulian jjulian commented Aug 16, 2016

  • create type aliases for headers and params
  • call log block before the request
  • call log block after response
  • remove default logger, add log examples to README

Not vital for the OrderUp app. I'm using it locally to debug, but I don't need to upgrade the app to use this code until you've reviewed it and are happy with it.

* create type aliases for headers and params
* call log block before the request
* call log block after response
* remove default logger, add log examples to README
@@ -215,28 +214,7 @@ public struct CRUDE {
return NSError(domain: issue, code: (network.response?.statusCode ?? -1), userInfo: debugInfo)
}

private static var defaultLogger: CRUDELog = { type, network in
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jjulian Is there a reason why the defaultLogger feature was removed?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging is very app-specific. If the client wants to log, they can easily use or modify the example code.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The default logger was a requested feature I added. While I will agree that different developer teams will have different logging preferences, an option to use a pre-baked one does no harm.

@JasonCanCode JasonCanCode merged commit 74c7644 into master Aug 17, 2016
@JasonCanCode JasonCanCode deleted the full-http-logging branch August 17, 2016 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants