IGWebLogger

IGWebLogger allows you to view your iOS app logs over web browser in realtime.

  • Owner: siuying/IGWebLogger
  • Platform:
  • License:: MIT License
  • Category::
  • Topic:
  • Like:
    0
      Compare:

Github stars Tracking Chart

IGWebLogger

IGWebLogger allows you to view your iOS app logs over web browser in realtime.

It is a CocoaLumberjack logger which prints log over websocket connection.

Status: Experimental

Install

The best way to use IGWebLogger is via CocoaPods. Add following line in your Podfile:

pod "IGWebLogger", "~> 0.2.0"

Usage

First, start the web socket server in AppDelegate.m


- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
  // setup logger
  [DDLog addLogger:[IGWebLogger sharedInstance]];

  // setup HTTP server
  self.httpServer = [IGWebLogger httpServer];
  NSError *error;
  if(![self.httpServer start:&error])
  {
      DDLogError(@"Error starting HTTP Server: %@", error);
  }

  return YES;
}

Use CocoaLumberjack as usual to add logs.


DDLogError(@"Broken sprocket detected!");
DDLogVerbose(@"User selected file:%@ withSize:%u", filePath, fileSize);

Then connects your browser to http://localhost:8888 to view the logs realtime. (If you run this on real device, replace localhost with the device name such as http://Meteor.local:8888)

Dependency

  • CocoaLumberjack - A fast & simple, yet powerful & flexible logging framework
  • CocoaHTTPServer - use the HEAD version which has latest WebSocket and ARC supports

Main metrics

Overview
Name With Ownersiuying/IGWebLogger
Primary LanguageObjective-C
Program languageCoffeeScript (Language Count: 6)
Platform
License:MIT License
所有者活动
Created At2013-03-04 08:26:16
Pushed At2013-03-07 13:01:15
Last Commit At2013-03-07 21:00:53
Release Count7
Last Release Name0.2.0 (Posted on )
First Release Name0.0.1 (Posted on )
用户参与
Stargazers Count30
Watchers Count4
Fork Count8
Commits Count36
Has Issues Enabled
Issues Count0
Issue Open Count0
Pull Requests Count0
Pull Requests Open Count0
Pull Requests Close Count0
项目设置
Has Wiki Enabled
Is Archived
Is Fork
Is Locked
Is Mirror
Is Private