The logging module enables the discovery of bugs or issues when the application is deployed to users.

Set Logging in the Application

Add APIs to call functions and methods for log statements. See the sample application for examples.

Set the Logging Level in the SDK Profile

You must set the logging level in the default profile for the SDK in the AirWatch Console. This configuration ensures that your network is not burdened with unwanted logging activity.

  1. Navigate to Groups & Settings > All Settings > Settings & Policies > Settings > Logging.
  2. Enable the feature.
  3. Select the logging level.

    Level Enum Syntax Logging Syntax Description
    Error AWLogLevel.error AWLogError("{log message}") Records only errors. An error displays failures in processes such as a failure to look up UIDs or an unsupported URL.
    Warning AWLogLevel.warning AWLogWarning("{log message}") Records errors and warnings. A warning displays a possible issue with processes such as bad response codes and invalid token authentications.
    Information AWLogLevel.info AWLogInfo("{log message}")

    Records a significant amount of data for informational purposes. An information logging level displays general processes, warning, and error messages.

    Debug or Verbose AWLogLevel.verbose AWLogVerbose("{log message}")

    Records all data to help with troubleshooting. This option is not available for all functions.

  4. Set to send logs over wifi or not.

Access SDK and Wrapped App Logs by Log File

Access SDK application logs from the App Logs page.

  1. Navigate to Apps & Books > Applications > Analytics > App Logs.
  2. Download or delete logs using the actions menu.

Access Logs by the View Logs Page

Use the View Logs feature from the actions menu to quickly access available log files pertaining to a single application.

  1. Navigate to Apps & Books > Applications > Native and select the Internal tab.

  2. Select the application.
  3. Select the View Logs option from the actions menu.