Latest 2.0.3
Homepage https://github.com/sohayb/AFNetworkActivityLogger
License MIT
Platforms ios 6.0, osx 10.8, requires ARC
Dependencies AFNetworking/NSURLSession, AFNetworking/NSURLConnection, CocoaLumberjack
Authors

AFNetworkActivityLumberjackLogger is an extension for AFNetworking 2.0 that logs network requests as they are sent and received. It is forked from AFNetworkActivityLogger but now with CocoaLumberjack logging.

AFNetworkActivityLumberjackLogger 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 verbose—say, if you only want to know when requests fail—then changing it is as simple as:

[[AFNetworkActivityLogger sharedLogger] setLevel:AFLoggerLevelError];

Contact

Sohayb Hassoun

License

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

Latest podspec

{
    "name": "AFNetworkActivityLumberjackLogger",
    "version": "2.0.3",
    "license": "MIT",
    "summary": "AFNetworking 2.0 Extension for Network Request Logging with Support of CocoaLumberjack forked from AFNetworkActivityLogger by Matt Thompson",
    "homepage": "https://github.com/sohayb/AFNetworkActivityLogger",
    "authors": {
        "Sohayb Hassoun": "[email protected]"
    },
    "source": {
        "git": "https://github.com/sohayb/AFNetworkActivityLogger.git",
        "tag": "2.0.3"
    },
    "source_files": "AFNetworkActivityLogger",
    "requires_arc": true,
    "platforms": {
        "ios": "6.0",
        "osx": "10.8"
    },
    "dependencies": {
        "AFNetworking/NSURLSession": [
            "~> 2.0"
        ],
        "AFNetworking/NSURLConnection": [
            "~> 2.0"
        ],
        "CocoaLumberjack": []
    }
}

Pin It on Pinterest

Share This