HumioCocoaLogger is a Logger for CocoaLumberJack which allows loggin directly into Humio
platform :ios, '9.0'
use_frameworks!
pod 'HumioCocoaLumberjackLogger', :git => "https://github.com/jjuncker/HumioCocoaLumberjackLogger.git"
You can specify your access token and dataspace by setting this information in your info.plist file or by parameters (see below)
<key>HumioAccessToken</key>
<string>yourAccessKeyHere</string>
<key>HumioDataSpace</key>
<string>yourDataSpaceHere</string>
If you installed using CocoaPods or manually:
import CocoaLumberjack
let logger = HumioLoggerFactory.createLogger()
//OR
//HumioLoggerFactory.createLogger(accessToken:"yourTokenHere", dataSpace:"yourDataSpaceHere")
DDLog.add(logger, with: .error)
// OR
//DDLog.setLevel(.error, for: HumioCocoaLumberjackLogger.self)
...
When the logger is created, it sets a uniuque id for that logger. This can be overridden by specifying loggerId in the create method. The default is:
loggerId:String=NSUUID().uuidString