

for all kinds of questions involving CocoaLumberjack, use the Google group or StackOverflow (use #lumberjack).įeatures Lumberjack is Fast & Simple, yet Powerful & Flexible.if you find issues or want to suggest improvements, create an issue or a pull request.read the Getting started guide, check out the FAQ section or the other docs.bootstrapWithCocoaLumberjack() // Use CocoaLumberjack as swift-log backend More information sharedInstance) // Configure loggers LoggingSystem. Import CocoaLumberjack import CocoaLumberjackSwiftLogBackend import Logging // In your application's entry point (e.g. To use swift-log with CocoaLumberjack, take a look the following code snippet to see how to get started. In your own log formatters, you can make use of the swiftLogInfo property on DDLogMessage to retrieve the details of a message that is logged via swift-log.

You will still configure the loggers and log formatters you want via DDLog, but writing log messages will be done using Logger from swift-log. You can then use DDLogHandler as backend for swift-log, which will forward all messages to CocoaLumberjack's DDLog. Simply add CocoaLumberjack as dependency to your SPM target (see above) and also add the CocoaLumberjackSwiftLogBackend product as dependency to your target. swift-log backendĬocoaLumberjack also ships with a backend implementation for swift-log. When integrating Lumberjack into an existing Objective-C it is possible to run into Multiple methods named 'tag' found with mismatched result, parameter type or attributes build error.Īdd #define DD_LEGACY_MESSAGE_TAG 0 before importing CocoaLumberjack or add #define DD_LEGACY_MESSAGE_TAG 0 or add -DDD_LEGACY_MESSAGE_TAG=0 to Other C Flags/ OTHER_CFLAGS in your Xcode project. ] // Uses os_logĭDFileLogger *fileLogger = init] // File LoggerįileLogger.rollingFrequency = 60 * 60 * 24 // 24 hour rollingį = 7 ĭDLogError( ") Objective-C ARC Semantic Issue
