CaptureLogger 1.0.3

CaptureLogger 1.0.3

测试测试通过的
语言语言 Obj-CObjective C
许可证 BSD
发布最后发布2018年7月

YiJianJun维护。



  • yijianjun

CaptureLogger已被BugshotKit修改。支持所有iOS版本。

简单用法

在Podfile文件中

pod 'CaptureLogger', :configurations => ['Debug']

--

在.pch文件中

#if DEBUG
#   import "CLCaptureLogger.h"
#   define NSLog(format,...) CLLog(format,##__VA_ARGS__)
[BugshotKit addLogMessage:[NSString stringWithFormat:@"<%@,%d>:%@\n",[[NSString stringWithUTF8String:__FILE__] lastPathComponent],__LINE__,[NSString stringWithFormat:format, ## __VA_ARGS__]]]
#else
#   define NSLog(format, ...)
#endif

其他方面您可以使用CLLog代替NSLog。

-- 在AppDelegate.m文件中

#if DEBUG
#   import "CLCaptureLogger.h"
#   import "CLBugshotManager.h"
#endif

- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    ...

#if DEBUG
    [CLCaptureLogger captureLoggerGestureEnable];
    [[CLBugshotManager sharedManager] setDisplayConsoleTextInLogViewer:YES];
#endif

    ...
}