AFNetworking Extension for HTTP Request Logging
Objective-C Ruby
Switch branches/tags
Nothing to show
Pull request Compare This branch is 2 commits ahead, 26 commits behind AFNetworking:master.
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
AFHTTPRequestOperationLogger.h
AFHTTPRequestOperationLogger.m
AFHTTPRequestOperationLogger.podspec
AFURLConnectionOperation+Spaceman.h
AFURLConnectionOperation+Spaceman.m
LICENSE
README.md

README.md

AFHTTPRequestOperationLogger

AFHTTPRequestOperationLogger is an extension for AFNetworking that logs HTTP requests as they are sent and received.

This is still in early stages of development, so proceed with caution when using this in a production application. Any bug reports, feature requests, or general feedback at this point would be greatly appreciated.

Example Usage

Add the following code to AppDelegate.m -application:didFinishLaunchingWithOptions::

[[AFHTTPRequestOperationLogger sharedLogger] startLogging];

Now all AFHTTPRequestOperation will have their request and response logged to the console, a la:

GET http://example.com/foo/bar.json
200 http://example.com/foo/bar.json

If the default logging level is too verbose—say, if you only want to know when requests fail, then changing it is as simple as:

[[AFHTTPRequestOperationLogger sharedLogger] setLevel:AFLoggerLevelError];

Contact

Mattt Thompson

License

AFHTTPRequestOperationLogger is available under the MIT license. See the LICENSE file for more info.