Wrapper for the LogDNA REST API written in Swift.
Requirements: you must have alamofire and swiftyjson installed in your project for this to work.
Usage:
- Drag and drop this file into your project
- In your didfinishlaunchingwithoptions initialize the SDK using your Ingestion Key
LogDNA.setup(withIngestionKey: "INSERT_INGESTION_KEY", hostName: "looq", appName: "LooqApp", includeNetworkData: true)
- Anywhere you want to send a log you can use this code:
LogDNA.log(line: "test message", level: .debug, meta: ["string":"test", "bool":false, "int":3])
- If you want to see the return of the API call. You can set verbose to true as follows:
LogDNA.shared.verbose = true