Git Product home page Git Product logo

ios-log-cclogsystem's Introduction

###CCLogSystem


CCLogSystem provide an iOS Log System. We can use to replace NSLog in our project.And it also provide recording logs to the local file and review or email logs in our app.

中文版本请戳: Chun Tips

####Main Features

  • Very simplay API to use
  • Use CC_LOG to print that get more info. The output info is include "TIMESTAMP" + "THREAD" + "FILE" + "LINE" + "FUNCTION" + origin print info.
  • Use CC_LOG_VALUE to print any value directly. Like: CC_LOG_VALUE(self.window) or CC_LOG_VALUE(self.window.frame)
  • Record crash issue
  • Record the logs to the local file
  • Provide the Developer UI to review and email the logs in the App

####Installation CCLogSytem is available as a CocoaPod.

pod 'CCLogSystem'

You can also simply copy all the source files located inside CCLogSystem/CCLogSystem/* into your iOS project.

####Example

How to setup CCLogSystem
- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:	(NSDictionary *)launchOptions
{
	[CCLogSystem setupDefaultLogConfigure];
}
Use CC_LOG macro to print log
- (BOOL)application:(UIApplication *)application willFinishLaunchingWithOptions:(NSDictionary *)launchOptions
{
	[CCLogSystem setupDefaultLogConfigure];

	CC_LOG(@"%@", application);
	// print: 2014-10-31 15:28:41.038 . <NSThread: 0x174063880>{number = 1, name = main} AppDelegate.m at 24 (-[AppDelegate application:willFinishLaunchingWithOptions:]): <UIApplication: 0x146e01cb0>
}
Use CC_LOG_VALUE macro to print any value
CC_LOG_VALUE(application);

id applicationTemp = application;
CC_LOG_VALUE(applicationTemp);

CC_LOG_VALUE(self.window);

CC_LOG_VALUE(self.window.frame);

CC_LOG_VALUE(self.window.transform);

Class applicationClass = NSClassFromString(@"UIApplication");
CC_LOG_VALUE(applicationClass);

SEL selector = @selector(application:continueUserActivity:restorationHandler:);
CC_LOG_VALUE(selector);

NSInteger test = 100;
CC_LOG_VALUE(test);

float test2 = 100.000001;
CC_LOG_VALUE(test2);

char test3 = 'a';
CC_LOG_VALUE(test3);

TestBlock testBlock = ^{
};
CC_LOG_VALUE(testBlock);
Review the logs in our app
    [CCLogSystem activeDeveloperUI];

Authors and License

  • All source code is licensed under the MIT License.
  • Copyright (c) 2014-2015, @Chun Ye

ios-log-cclogsystem's People

Contributors

chunyeah avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.