Latest 1.0.0
Homepage https://github.com/LYajun/LGLog
License MIT
Platforms ios 8.0, requires ARC
Dependencies CocoaLumberjack
Authors

基于CocoaLumberjack的日志管理工具,包含日志分类打印,保存及定期同步服务器

使用方式

1、集成:

pod 'LGLog'

2、配置

/** 开启日志文件系统, 默认日志文件刷新频率为1周 */
- (void)startFileLogSystem;

/**
 以指定日志文件保存路径开启日志文件系统

 @param direct 日志文件保存路径
 @param freshLogFrequency 日志刷新频率
 */
- (void)startFileLogSystemWithDirectory:(NSString *)direct
                      freshLogFrequency:(LGLogFrequency) freshLogFrequency;
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
    [[LGLogManager shareInstence] startFileLogSystem];
    return YES;
}

3、使用

LGLogError(@"错误信息")
LGLogWarn(@"警告信息")
LGLogInfo(@"普通信息")
LGLogDebug(@"调试信息")

4、样例

[ [ERROR]-> 2018-03-30 14:06:16 ] 
位置: 
fileName:ViewController
function:-[ViewController viewDidLoad]
line:20 
信息:错误信息
[ [ERROR]->  2018-03-30 14:06:16 ]
[ [WARN]--> 2018-03-30 14:06:16 ] 
位置: 
fileName:ViewController
function:-[ViewController viewDidLoad]
line:21 
信息:警告信息
[ [WARN]-->  2018-03-30 14:06:16 ]

Latest podspec

{
    "name": "LGLog",
    "version": "1.0.0",
    "summary": "u57fau4e8eCocoaLumberjacku7684u65e5u5fd7u7ba1u7406u5de5u5177",
    "homepage": "https://github.com/LYajun/LGLog",
    "license": "MIT",
    "authors": {
        "u5218u4e9au519b": "[email protected]"
    },
    "platforms": {
        "ios": "8.0"
    },
    "source": {
        "git": "https://github.com/LYajun/LGLog.git",
        "tag": "1.0.0"
    },
    "source_files": "LGLog/*.{h,m}",
    "requires_arc": true,
    "dependencies": {
        "CocoaLumberjack": []
    }
}

Pin It on Pinterest

Share This