All logging internal to the SDK is printed to standard output (stdout) and written to a log file, whose default location is APP_ROOT/Library/Application Support/aspera.ios.log. This log will be rotated therefore at any given time there may be more than one log file in the application.
Experience has shown that these log files are very useful in evaluating transfers and troubleshooting transfer errors, but due to the restricted access that iOS devices normally provide to their file systems it is possible for these logs to be inaccessible. It is therefore recommended that you provide a way to extract these logs from your application.
There are several ways in which this may be accomplished. A solution which has been proved straightforward in the past is to allow the user to send these logs via email, directly from the application. Since most iOS devices are already configured with an email account this solution allows extracting the logs from any device with internet connectivity. The SDK provides the class ASLogMailer which makes this task almost trivial:
This will use the view passed in the last parameter ('self' in the previous example) to modally present an MFMailComposeViewController with a message containing diagnostic information and the logs as attachments, and the user must approve the email in order for it to be sent. If no email account is configured on the device this method will fail.
Another way to make the logs available is to change the log's path to the documents directory and then enable document sharing for the application. For the first task you may use setLogFilePathRelativeToDocumentsDirectory: (AsperaMobile), while for the second you will need to enable this feature in your applications plist file (consult Apple's documentation for more information on file sharing and the key UIFileSharingEnabled). This method does not require user interaction with your application, but it does require the iOS device to be synced with iTunes in order to retrieve the log files.
Finally, you can access the logs directly by using logFiles (AsperaMobile) to retrieve their paths.
If it is not desirable to have the SDK log to standard out, this functionality may be controlled by setting the value of allowLoggingToStdout: (AsperaMobile). Setting this value to NO will cause the SDK to log only to the log file and not to standard out (the default value is YES).
Alternatively, logging related to FASP transfers can be completely disabled using
It may be re-enabled using
Note that disabling FASP logging in this manner prevents most logging to both standard out and to the log file (some information will still be logged). This is discouraged for release builds (it will significantly reduce the usefulness of logs in analyzing transfers).
1.8.8