https://github.com/cbess/timber
iOS and Mac app logging made easy. Batteries included.
https://github.com/cbess/timber
Last synced: about 1 year 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 (over 12 years ago)
- Default Branch: master
- Last Pushed: 2022-02-26T15:29:14.000Z (over 4 years ago)
- Last Synced: 2025-03-10T20:02:00.594Z (over 1 year ago)
- Language: Objective-C
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 1
- 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 username
CBTLogDebugt(@"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.