This library is created for simple unified logging successful and unsuccessful events.
Using any of these tools is optional, and can be adjusted
-
Add to your proj-Prefix.pch file line:
#import "Logger.h"
-
Initialize module (ex. in AppDelegate) with:
initWithConsoleReporting: (BOOL)consoleReporting writeTimeInConsole: (BOOL)writeTimeInConsole debugDictionary: (NSDictionary*)debugDictionary flurryApiKey: (NSString*)flurryApiKey flurryUserID: (NSString*)flurryUserID
- If you don't want any logs in console and flurry, use initWithConsoleReporting: NO
- If you need logging some key/values at each time, use debugDictionary: your_dictionary
- If you don't need flurry at all, use flurryApiKey: nil
- If you don't need flurry user identification use flurryUserID: nil
-
For logging event use one of these functions with (optional) debug information in NSString or NSDictionary
log: (eventType)type withDebugString: (NSString*)format, ...; log: (eventType)type withDebugDict: (NSDictionary*)debugDict; log: (eventType)type withTitle: (NSString*)title message: (NSString*)message alert: (BOOL)isAlert debugString: (NSString*)format, ...; log: (eventType)type withTitle: (NSString*)title message: (NSString*)message alert: (BOOL)isAlert debugDict: (NSDictionary*)debugDict;
<To run the example project, clone the repo, and run pod install from the Example directory first.>
iOS 4+ with ARC (including support iOS 8.1.1)
Logger is available through CocoaPods. To install it, simply add the following line to your Podfile:
pod "Logger"
Victor, vsdyachkov@rambler.ru
Logger is available under the MIT license. See the LICENSE file for more info.