CocoaLumberjack with Swift - Calling preprocessor macros

后端 未结 3 1727
鱼传尺愫
鱼传尺愫 2020-12-28 10:32

I started to build an IOS app with the new programming language Swift. I managed to use CocoaPods and was able to successfully create the DDTTYLogger with my CustomLoggerFor

3条回答
  •  难免孤独
    2020-12-28 11:23

    I created a Swift wrapper for CocoaLumberjack that encapsulates everything nicely.

    DDLog.addLogger(DDTTYLogger.sharedInstance())
    DDLog.logLevel = .Info
    
    logInfo("Info")
    logWarn("Warn")
    logDebug("Debug")
    logError("Error")
    

提交回复
热议问题