iOS console logs
AppeliumFeedback records the console logs of your iOS app in an activity log that accompanies every bug report, crash report and error report in the Appelium Dashboard. Unlike NSLog() and print(), Appelium logs have verbosity levels and optional domains, so you can filter what happened before an issue without access to the user's iPhone or iPad. If you already use CocoaLumberjack or XCGLogger, you can route those logs to Appelium instead.
Use Appelium logs through the following methods:
AppeliumFeedback.logVerbose("Verbose statement")
AppeliumFeedback.logInfo("Info statement")
AppeliumFeedback.logWarning("Warning statement")
AppeliumFeedback.logDebug("Debug statement")
AppeliumFeedback.logError("Error statement")
All the log levels allow you to pass an optional domain for even better granularity:
AppeliumFeedback.logError("Transaction failed", domain: "Payment")
CocoaLumberjack
Already using CocoaLumberjack for logging? Great! Appelium provides an extension that allows you to simply route all your logging calls to it without changing a lot of code.
You can integrate it using Carthage:
binary "https://api.appelium.com/v1/sdkArchives/AppeliumCocoaLumberjack.json"
Once you have integrated it, import the AppeliumCocoaLumberjack.framework into your project and enable logging:
DDLog.add(DDAppeliumLogger.sharedInstance())
XCGLogger
Already using XCGLogger for logging? Great! Appelium provides a XCGLogger logging destination which allows you to simply route all your logging calls to it without changing a lot of code.
You can integrate it using Carthage:
binary "https://api.appelium.com/v1/sdkArchives/AppeliumXCGLogger.json"
Once you have integrated it, import the AppeliumXCGLogger.framework into your project and enable logging:
let appeliumLogDestination = AppeliumLogDestination()
XCGLogger.default.add(destination: appeliumLog)