Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including express-antenna-cocoalumberjack with all npm packages installed. Try it out:

var expressAntennaCocoalumberjack = require("express-antenna-cocoalumberjack")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

express-antenna-cocoalumberjack v1.1.0

Antenna Express.js endpoint for receiving CocoaLumberjack logs.

Express-Antenna-CocoaLumberjack

This package is an example endpoint for Antenna based CocoaLumberjack logger.

Usage

Install the package, then start it:

npm install express-antenna-cocoalumberjack
node node_modules/express-antenna-cocoalumberjack/app.js

To configure it, you can supply the following env variables:

export NODE_EXPRESS_ANTENNA_PORT=12345
export NODE_EXPRESS_ANTENNA_LOG_PATH=/tmp/

To verify that the server is running, point your browser to http://yourhost:3205/ping/.

On the objective-c project:

Add AFNetworking (2.0), CocoaLumberjack and DDAntennaLogger to your Podfile:

pod 'AFNetworking'
pod 'CocoaLumberjack'
pod 'DDAntennaLogger', :git => 'https://github.com/mokagio/DDAntennaLogger'

Then run:

pod install

Then in your appdelegate.m:

[[Antenna sharedLogger] addChannelWithURL:[NSURL URLWithString:@"http://localhost:3205/log/"] method:@"POST"];
[[Antenna sharedLogger] startLoggingApplicationLifecycleNotifications];

DDAntennaLogger *logger = [[DDAntennaLogger alloc] initWithAntenna:[Antenna sharedLogger]];
[DDLog addLogger:logger];

DDLogInfo(@"DDAntennaLogger is cool!");

Enjoy it!

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free