TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | May 2017 |
Maintained by llg.
a log redirect to file ,建议使用最新版本
将NSLog替换为DDLog或者重新定义NSLog参见DDLog的定义可以在release模式下重向log到预先定义的日志目录 DDLoggerClient log控制器 DDLoggerManager 本地log资源管理 使用方法: 前提使用的cocopods pod 'DDLogger', '~> 1.2.5'
- (void)startLogWithCacheDirectory:(NSString *)cacheDirectory fileName:(NSString *)fileName;
@code
(BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
NSArray *paths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES); NSString *docDir = [paths objectAtIndex:0]; [[DDLoggerClient sharedInstance] startLogWithCacheDirectory:docDir fileName:@"log.txt"];
return YES;
}
@endcode
- (void)stopLog;
- (BOOL)isShowLogView;
- (void)showLogView;
- (void)hidenLogView;
@param viewController 当前的Viewontroller
@param handler 选取回调结果
- (void)pikerLogWithViewController:(UIViewController *)viewController eventHandler:(DDPikerLogEventHandler)handler;