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?
已存档?
是复刻?
已锁定?
是镜像?
是私有?