TestsTested | ✗ |
LangLanguage | Obj-CObjective C |
License | MIT |
ReleasedLast Release | Jun 2016 |
Maintained by CatchZeng.
An iOS log system,contains many excellent features,based on Xcodecolors and KZLinkedConsole.
Add log review and email the log files in the App
Add mac client to help you debug without the data line.(mac client called CATLogServer.zip is included in the project file)
Add custom background color for log
中文请下翻
This library requires a deployment target of iOS 6.0 or greater.
It takes as little as a single line of code to configure CATLog when your application launches.Then replace your NSLog statements with CLog[X] statements and that's about it.
pod 'CATLog'
Alternatively you can directly add the CATLog.h
& CATLog.m
source files to your project.
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//Set ExceptionHandler
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);
//Init log
[CATLog initWithNumberOfDaysToDelete:3];
}
void uncaughtExceptionHandler(NSException *exception){
[CATLog logCrash:exception];
}
[CATLog setLogLevel:CATLevelE];
[CATLog setR:200 G:200 B:200 forLevel:CATLevelE];
#define YouLogI(fmt, ...) [CATLog logI:[NSString stringWithFormat:@"[%@:%d] %s %@",[NSString stringWithFormat:@"%s",__FILE__].lastPathComponent,__LINE__,__func__,fmt],##__VA_ARGS__,@""];
YouLogI(@"ReDefine Log by yourself");
[CATLog shwoAllLogFile];
[CATLog showTodayLogFile];
1.Fix numberOfDaysToDelete bug
2.Add log review and email the log files in the App
1.Fix pod bug
2.Add mac client
Add project
一个基于Xcodecolors和KZLinkedConsole,拥有许多优良特性的iOS开源日志工具。
iOS6或以上
只需加入几行代码就可配置完毕。然后将NSLog换成CLog[X] 就可以了。
pod 'CATLog'
直接拖拽 CATLog.h
& CATLog.m
到工程中即可。
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
//Set ExceptionHandler
NSSetUncaughtExceptionHandler(&uncaughtExceptionHandler);
//Init log
[CATLog initWithNumberOfDaysToDelete:3];
}
void uncaughtExceptionHandler(NSException *exception){
[CATLog logCrash:exception];
}
[CATLog setLogLevel:CATLevelE];
[CATLog setNumberOfDaysToDelete:3];
[CATLog setR:200 G:200 B:200 forLevel:CATLevelE];
#define YouLogI(fmt, ...) [CATLog logI:[NSString stringWithFormat:@"[%@:%d] %s %@",[NSString stringWithFormat:@"%s",__FILE__].lastPathComponent,__LINE__,__func__,fmt],##__VA_ARGS__,@""];
YouLogI(@"ReDefine Log by yourself");
[CATLog shwoAllLogFile];
[CATLog showTodayLogFile];
1.修复了设置删除日志文件天数的bug
2.增加日志的预览和邮件发送日志功能
1.修复pod问题
2.增加mac客户端
添加基本工程