# Capturing Network Logs

Updated 3 months ago by Kashif Hussain

Sofy allows you to capture and analyze **network activity** during your test sessions. This helps debug app behavior by surfacing **exact network requests and responses**, making it easier to spot connectivity issues and validate backend interactions, to ensure your application is communicating as expected.

#### How to Capture Network Logs

1. **Acquire a Device**
   1. Log in to your Sofy account.
   2. Select **Device Lab** from the left navigation bar.  
  
   3. Locate the device you want to test, then select **Acquire**.  
  
   4. Click **Launch** to open the device in a new window.  
  
 
2. **Start Logging**  
   - From the device toolbar, click on **the Play icon next to Network Logging**

- Sofy will begin recording all network traffic generated during your test session.
   - All system prompts regarding allowing the network logging to begin on the device will be auto-handled by Sofy.

3. **Stop Logging**  
   - When you have captured the required activity, click on the **Stop Icon next to Network Logging**.  
   
   - A prompt will appear with two options:
     - **Download Logs** – Save the recorded logs.
     - **Discard Logs** – Delete the recording permanently.

- If you choose **Download Logs**, the captured file will become available for download in **PCAP format (.pcap)**.

- PCAP is a standard format for network packet capture and can be opened in industry-standard tools such as:
  - **Wireshark** (recommended)
  - **tcpdump**
  - Other network analysis tools that support PCAP.

#### Best Practices
- **Start logging only when needed** – Network captures can grow quickly in size.
- **Use Wireshark for detailed analysis** – Wireshark provides filtering, search, and visualization options to analyze captured traffic effectively.
- **Secure your logs** – Network captures may include sensitive data. Only share them with authorized team members.

#### Common Use Cases
- Verifying requests and responses made to backend services.
- Investigating latency or connectivity issues.
