Logs specific to actions controlled by the Airwatch agent can be obtained by clicking the Agent Icon and navigating to Preferences -> Diagnostics -> View Agent Logs. A new window titled AirwatchAgent.log will open which contains real time information of all Agent related activity. The logs will be updated in real time, and hence once the required logs are collected they can be saved in desired location by selecting File -> Save Copy As.
On macOS, the Console application can be used to view the device logs. Console captures real time logs of all activities performed by the machine. Below are the steps to view the logs:
- To open the Console application, navigate to Finder > Applications > Utilities > Console.
- The application will open to the All Messages page. Navigate to the system.logs area.
- In the search filter in the top right corner, search for MDMClient. This will narrow down the results to only AirWatch related functions.
- To collect logs only for the time frame of when the issue is replicated, you can clear the page by selecting the Clear button on the toolbar. You can also insert a marker which will allow you to identify a particular point in time later on.
In order to gather additional information, these logs can be set to debug mode through the Terminal application. Navigate to Finder -> Applications -> Utilities -> Terminal. Run the following commands to enable debug mode:
sudo defaults write /Library/Preferences/com.apple.MCXDebug debugOutput -2 sudo defaults write /Library/Preferences/com.apple.MCXDebug collateLogs 1 sudo touch /var/db/MDM_EnableDebug
To save the log file, navigate to File -> Save Copy As, which will save the log file in the specified location in the .log format.
After testing, run the following commands to disable debug mode:
sudo rm –rf /var/db/MDM_EnableDebug sudo defaults delete /Library/Preferences/com.apple.MCXDebug debugOutput sudo defaults delete /Library/Preferences/com.apple.MCXDebug collateLogs