About
XCDLumberjackNSLogger is a CocoaLumberjack logger which sends logs to NSLogger.
Requirements
- Runs on iOS 5.0 and later
- Runs on OS X 10.7 and later
Installation
XCDLumberjackNSLogger is available through CocoaPods.
pod "XCDLumberjackNSLogger", "~> 1.0.1"
Usage
XCDLumberjackNSLogger is fully documented.
Simply send logs to NSLogger
[DDLog addLogger:[XCDLumberjackNSLogger new]];
Configuring a bonjour service name
NSString *bonjourServiceName = [[[NSProcessInfo processInfo] environment] objectForKey:@"NSLOGGER_BONJOUR_SERVICE_NAME"];
[DDLog addLogger:[[XCDLumberjackNSLogger alloc] initWithBonjourServiceName:bonjourServiceName]];
Translating contexts to tags
XCDLumberjackNSLogger *logger = [XCDLumberjackNSLogger new];
logger.tags = @{ @80 : @"CocoaHTTPServer", @((NSInteger)0xced70676) : @"XCDYouTubeKit" };
[DDLog addLogger:logger];
Configuring a viewer host
XCDLumberjackNSLogger *logger = [XCDLumberjackNSLogger new];
LoggerSetViewerHost(logger.logger, CFSTR("10.0.1.7"), 50000);
[DDLog addLogger:logger];
Contact
CĂ©dric Luthi
License
XCDLumberjackNSLogger is available under the MIT license. See the LICENSE file for more information.