Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cbess/timber
iOS and Mac app logging made easy. Batteries included.
https://github.com/cbess/timber
Last synced: about 1 month ago
JSON representation
iOS and Mac app logging made easy. Batteries included.
- Host: GitHub
- URL: https://github.com/cbess/timber
- Owner: cbess
- License: mit
- Created: 2013-12-24T17:51:27.000Z (almost 11 years ago)
- Default Branch: master
- Last Pushed: 2022-02-26T15:29:14.000Z (over 2 years ago)
- Last Synced: 2024-09-19T04:32:30.942Z (about 2 months ago)
- Language: Objective-C
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
Timber
======iOS and macOS app logging made easy, for the whole team.
## Install
Cocoapods: `pod 'Timber'`
`#import `
## Usage
```objc
- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions {
CBTDebugMark();
[CBTimber setLogTag:@"test" forUsername:@"cbess"];
//[CBTimber setLogTag:@"test one" forUsername:nil]; // overrides any tags specified by a usernameCBTLogDebugt(@"test tag", @"simple test log: %@", @7);
return YES;
}
```Enable using:
`-D DEBUG=1` or `-D ENABLE_TIMBER=1`## Macros
CBTLog(Level, Tag, Message, ...)
CBTDebugCode(BLOCK)
CBTDebugMark()#### Log macros
CBTLogVerbose(MSG, ...)
CBTLogDebug(MSG, ...)
CBTLogInfo(MSG, ...)
CBTLogWarn(MSG, ...)
CBTLogError(MSG, ...)
CBTLogDebugError(`NSError`)#### Log macros w/ tagging
CBTLogVerboset(TAG, MSG, ...)
CBTLogDebugt(TAG, MSG, ...)
CBTLogInfot(TAG, MSG, ...)
CBTLogWarnt(TAG, MSG, ...)
CBTLogErrort(TAG, MSG, ...)## Notes
See `CBTimber.h` for more details.