Introduction
Logs are a great source of information to help understand component behavior. There may be times when Customer Support asks you to provide logs. If in doubt provide them anyway.
This article will help you walk through collecting the following types of logs:
- Browser console logs - Useful for error messages and for some additional details in verbose logs
- Browser network HAR file logs - Useful to understand the network errors and messages sent back to Live Assist servers
- Non Browser Logs
Collecting Browser Console Logs
Before obtaining browser logs (or console logs) from Chrome or Firefox, enable timestamps on your browser. This helps synchronize client and server timings.
Enabling timestamps and preserving logs upon navigation
Using Chrome
- Open the Developer Tools console. You may do this by either of the following methods:
a.) Press the F12 key or;
b.) Main Menu: Click the Customise and control Google Chrome button and then select More Tools > Developer Tools. - Click the Settings
- Go to Preferences > Console then tick the following checkboxes:
- Log XML HTTPRequests
- Show timestamps
- Preserve log upon navigation
Using Firefox
- Open the Developer Tools console. You may do this by either of the following methods:
a.) Press the F12 key or;
b.) From the Firefox menu bar , click More Tools > Web Developer Tools, then press the Console Settings - Click to enable these options from the dropdown:
- Persist Logs
- Show Timestamps
- Group Similar Messages
To collect console logs on Chrome or Firefox
- Open the Developer Tools
- In chrome ensure you are collecting verbose level logs like this
- Perform the steps of the scenario to capture.
- Depending on your browser:
- Right-click > Save as (notepad text file).
- Right-click > Select All, Right-click > Copy.
- Paste that into a text file.
- Attach the text files to your support ticket.
Collecting HAR logs
The HTTP Archive format or HAR is a JSON-format archive for logging a web browser's interaction with a site. This is very useful for diagnosing network issues and messages sent back and forth to Live Assist servers.
Note: Recording normally starts by selecting the Network tab. You should start recording prior to the replication of the error otherwise you will not capture the problem in these logs.
How to generate a HAR on Chrome
- Open Google Chrome and go to the page where the issue is occurring.
- Open the Developer Tools Console. You may do this by either of the following methods:
a.) Press the F12 key or;
b.) Main Menu: Click the Customise and control Google Chrome button and then select More Tools > Developer Tools. - The panel opens either at the bottom or at the right side of your screen, select the Network tab.
- Look for a round Record button ( ) in the upper left corner of the Network tab; it is red when recording. If it is grey, click it once to start recording.
- Check the box next to the Preserve log.
- Click the Clear button ( ) to clear out any existing logs from the Network tab.
- Perform the steps of the scenario to capture. This might involve refreshing the page first.
- Due to a limitation in Chrome if the problem is not replicated within about 20 minutes the logs can be corrupted. To avoid this, every 20 minutes, use the clear button on both the har and console tabs to limit the size of data capture, until the problem is replicated. When clearing the logs you should also refresh the page after. This will not affect existing chats
- Right-click anywhere on the grid of network requests. Depending on your browser:
a.) Select Save as HAR with Content and save the file to your computer or;
b.) Select Copy > Copy all as HAR
How to generate the HAR file for Firefox
- Open Firefox and go to the page where you are experiencing trouble.
- Open the Developer Tools console. You may do this by either of the following methods:
a.) Press the F12 key or;
b.) From the Firefox menu bar , click More Tools > Web Developer Tools, then press the Console Settings - Choose the Network tab.
- Check the box next to the Persist Logs
- The recording autostarts when you start performing actions in the browser.
- Once you have replicated the issue and you see that all of the actions have been generated in the Developer Network Panel (should just take a few seconds), right-click anywhere under the File column, then click on Save all as HAR.
- Finally, upload the HAR file to your ticket or attach it to your email so that we may analyze it.
How to generate a HAR on Microsoft Edge
- Browse to the URL where you wish to begin capturing
- Navigate to Developer Tools (use F12 as a shortcut) and select the Network tab.
- Perform the steps of the scenario to capture.
- Save the record through:
a.) Right-click > Save all as HAR with content (recommended) or;
b.) Right-click > Copy > Copy all as HAR. Paste then Save.
Collecting Non-Browser Logs
Collecting USD Logs or Network Traffic
Please refer to Capturing USD logs. This section also includes steps for capturing network traffic.
Collecting logs from Chrome on Android
Typically, applications manage their own logs running on Android. To access Android logs root access you require root access. It is possible to collect logs with a remote debug session. See Remote Debugging Android Devices.
Collecting logs from Safari on iOS
Collect run-time logs with Safari Web Inspector.
See: