Skip to content

AppleDP/WQConsole

Repository files navigation

WQConsole

在App运行页面打印控制台日志

Effect

Usage

-application:didFinishLaunchingWithOptions 函数延时调用

    WQShareConsole.consoleColor = [UIColor blackColor];
    [WQShareConsole performSelector:@selector(openViewLog)
                         withObject:nil
                         afterDelay:0.5];

WQConsole.h 中可以打开 NSLog 函数的日志在App运行页面输出

    #if 1
        // 打开 NSLog 监听
        #define NSLog(FORMAT,...) [WQShareConsole log:nil \
                                                 file:[[NSString stringWithUTF8String:__FILE__] lastPathComponent] \
                                                 line:__LINE__ \
                                               thread:[NSThread currentThread] \
                                                  log:(FORMAT), ## __VA_ARGS__]
    #endif

About

在App运行页面打印控制台日志

Resources

License

Stars

Watchers

Forks

Packages

No packages published