Are you happy with your logging solution? Would you help us out by taking a 30-second survey? Click here

AFNetworkActivityLogger

AFNetworking 2.0 Extension for Network Request Logging

Subscribe to updates I use AFNetworkActivityLogger


Statistics on AFNetworkActivityLogger

Number of watchers on Github 495
Number of open issues 15
Average time to close an issue 2 months
Main language Objective-C
Average time to merge a PR about 2 months
Open pull requests 6+
Closed pull requests 13+
Last commit over 4 years ago
Repo Created about 6 years ago
Repo Last Updated over 1 year ago
Size 12.8 MB
Organization / Authorafnetworking
Contributors7
Page Updated
Do you use AFNetworkActivityLogger? Leave a review!
View open issues (15)
View AFNetworkActivityLogger activity
View on github
Fresh, new opensource launches 🚀🚀🚀
Trendy new open source projects in your inbox! View examples

Subscribe to our mailing list

Evaluating AFNetworkActivityLogger for your project? Score Explanation
Commits Score (?)
Issues & PR Score (?)

AFNetworkActivityLogger

AFNetworkActivityLogger is an extension for AFNetworking 2.0 that logs network requests as they are sent and received.

AFNetworkActivityLogger listens for AFNetworkingOperationDidStartNotification / AFNetworkingOperationDidFinishNotification and AFNetworkingTaskDidStartNotification / AFNetworkingTaskDidFinishNotification notifications, which are posted by AFNetworking as request operations and session tasks are started and finish. For further customization of logging output, users are encouraged to implement desired functionality by listening for these notifications.

Usage

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

[[AFNetworkActivityLogger sharedLogger] startLogging];

Now all AFURLConnectionOperation and NSURLSessionTask objects created by an AFURLSessionManager 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 verbosesay, if you only want to know when requests failthen changing it is as simple as:

[[AFNetworkActivityLogger sharedLogger] setLevel:AFLoggerLevelError];

Contact

Mattt Thompson

  • http://github.com/mattt
  • http://twitter.com/mattt
  • m@mattt.me

License

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

AFNetworkActivityLogger open issues Ask a question     (View All Issues)
  • almost 3 years TaskDidResume notification not working - AFNetworking 3.1
  • over 3 years App crash with version 3.0.0
  • over 3 years Carthage for 3_0_0 branch
  • over 3 years Set Logger to AFLoggerLevelDebug
  • over 3 years NSTimeInterval elapsedTime is nan sometimes
  • almost 4 years AFNetworking 3.0
  • about 4 years Request body is nil
  • over 4 years Logger doesn't work well in AFHTTPSessionManager
AFNetworkActivityLogger open pull requests (View All Pulls)
  • Add indicator for HTTPBodyStream in AFLoggerLevelDebug
  • method to print JSON messages as JSON instead of NSDictionary.
  • Updates AFNetworking dependency to 3.0
  • Fix Carthage dependency
  • Removes deprecated AFNetworkActivityLogger:setLevel from README
  • Add setLogLevel method.
AFNetworkActivityLogger questions on Stackoverflow (View All Questions)
  • library not found for -lPods-Kurbside-AFNetworkActivityLogger
AFNetworkActivityLogger list of languages used
Other projects in Objective-C