IGWebLogger

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

Github星跟蹤圖

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

主要指標

概覽
名稱與所有者siuying/IGWebLogger
主編程語言Objective-C
編程語言CoffeeScript (語言數: 6)
平台
許可證MIT License
所有者活动
創建於2013-03-04 16:26:16
推送於2013-03-07 21:01:15
最后一次提交2013-03-07 21:00:53
發布數7
最新版本名稱0.2.0 (發布於 )
第一版名稱0.0.1 (發布於 )
用户参与
星數30
關注者數3
派生數8
提交數36
已啟用問題?
問題數0
打開的問題數0
拉請求數0
打開的拉請求數0
關閉的拉請求數0
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?