> ## Documentation Index
> Fetch the complete documentation index at: https://moengage.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# How to share Android MoEngage SDK logs

> Enable and share verbose MoEngage Android SDK logs with the support team to resolve issues faster.

Sometimes, our support team will ask for logs as the first step to resolve the issue faster. Logs can help us and in some cases you quickly identify the issue and share the exact solution to a problem. 

In this document, we list a few steps that you can execute to share the MoEngage SDK logs with the MoEngage support team.

<iframe src="https://www.youtube.com/embed/kQjcdzQkOq4" title="YouTube video player" frameborder="0" className="w-full aspect-video rounded-xl" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" allowfullscreen />

## Enable debug logs

MoEngage SDK logs are best read in verbose format, which prints almost all the steps the SDK takes at any given time. You must first enable verbose-level logging by following this documentation and changing the initialization code a bit.

<CodeGroup>
  ```Kotlin Kotlin wrap theme={null}

  val moEngage = MoEngage.Builder(
          application = this,
          appId = "YOUR_Workspace_ID",
          dataCenter = DataCenter.DATA_CENTER_X
      )
      .configureLogs(LogConfig(logLevel = LogLevel.VERBOSE, isEnabledForReleaseBuilds = true))
      .build()
  ```

  ```Java Java theme={null}
   
  MoEngage moEngage = new MoEngage.Builder(this, "YOUR_Workspace_ID", DataCenter.DATA_CENTER_X)
                .configureLogs(new LogConfig(LogLevel.VERBOSE, true))
                .build();
  ```

  ```ReactNative ReactNative theme={null}

  MoEngage moEngage = new MoEngage.Builder(this, "YOUR_Workspace_ID", DataCenter.DATA_CENTER_X)
                .configureLogs(new LogConfig(LogLevel.VERBOSE, true))
  ```

  ```Flutter Flutter theme={null}

  MoEngage moEngage = new MoEngage.Builder(this, "YOUR_Workspace_ID", DataCenter.DATA_CENTER_X)
                .configureLogs(new LogConfig(LogLevel.VERBOSE, true))
  ```
</CodeGroup>

<Warning>
  Ensure to remove the above lines before the application is pushed to production.
</Warning>

## Android Studio

We will list the steps for sharing logs in Android Studio here, but similar steps apply to other IDEs.

1. First, connect your device to your laptop/PC.
2. Open Android Studio and click on Logcat.

   <Frame>
     <img src="https://mintcdn.com/moengage/LKbZnn8KNdjSphyQ/images/image1.png?fit=max&auto=format&n=LKbZnn8KNdjSphyQ&q=85&s=905790332584d571ef0a9e0f149f53ba" alt="Image1" width="1605" height="887" data-path="images/image1.png" />
   </Frame>
3. Type MoE in the search field to filter only MoEngage logs(Please make sure the device is showing in device details and the correct device is shown).

   <Frame>
     <img src="https://mintcdn.com/moengage/LKbZnn8KNdjSphyQ/images/image3-1.png?fit=max&auto=format&n=LKbZnn8KNdjSphyQ&q=85&s=69072df37471a8c7e170e567d3c4152f" alt="Image3 1" width="1610" height="909" data-path="images/image3-1.png" />
   </Frame>

   <Frame>
     <img src="https://mintcdn.com/moengage/LKbZnn8KNdjSphyQ/images/image5.png?fit=max&auto=format&n=LKbZnn8KNdjSphyQ&q=85&s=2bd68c2e531ee8e58eb400f6b9c94d64" alt="Image5" width="1920" height="1080" data-path="images/image5.png" />
   </Frame>
4. MoEnage SDK-related logs should look like something shown in the picture below.

   <Frame>
     <img src="https://mintcdn.com/moengage/LKbZnn8KNdjSphyQ/images/image4.png?fit=max&auto=format&n=LKbZnn8KNdjSphyQ&q=85&s=2b81af2a8cfd1b262757466feeffbe2e" alt="Image4" width="1608" height="894" data-path="images/image4.png" />
   </Frame>
5. Copy the required lines or all lines in the Logcat, paste them on a text file, and share the file with MoEngage support team.

## Essential Logs

When browsing the logs, you can search for a few keywords to understand what is happening with the various services that MoEngage offers. Please note that verbose logs for MoEngage SDK has to be enabled for keywords to show up.

### Data tracking

 

<img src="https://mintcdn.com/moengage/LKbZnn8KNdjSphyQ/images/datatracking.png?fit=max&auto=format&n=LKbZnn8KNdjSphyQ&q=85&s=b08cc9d0d37c754c36e1386911d5f54b" alt="Datatracking" width="3440" height="538" data-path="images/datatracking.png" />

 

**Search string** - sdk/report

**Occurrence** - You can see this string multiple times, and this log gets printed when the app is gone to the background and killed state. There are other cases when this log can be printed, but we will stick to these two conditions for now as we can easily perform background or kill actions. This line is seen 3 seconds after the app goes into the background or killed state.

**Description**

This log line indicates that the API call has been made to MoEngage servers and has succeeded. This API call is dependent on the proper integration of the lifecycle process. You might not see this line when the app goes into the background or killed state if the lifecycle observer isn't properly registered. Troubleshooting article - [How to debug lifecycle issues](/developer-guide/android-sdk/troubleshooting-and-faqs/troubleshooting-and-faqs#Why-is-lifecycle-process-library-important?).

### Push Token

<img src="https://mintcdn.com/moengage/lJn1dQ8d5bjpluQk/images/pushtoken.png?fit=max&auto=format&n=lJn1dQ8d5bjpluQk&q=85&s=3804653998c66384ae1762f0f930dcf6" alt="Pushtoken" width="3456" height="946" data-path="images/pushtoken.png" />

**Search string** - push\_id

**Occurrence** - This string **push\_id** can be seen in sdk/report API call as part of the params. There are other cases when push\_id is sent to MoEngage servers, but since we can easily take the app to background state, we are mentioning only this case here.

**Description**

If this parameter is present and not empty, it indicates that the push token was properly acquired by MoEngage SDK and synced with MoEngage backend servers. You might not see push\_id or empty value if there are problems with your FCM project setup. Please go through the [push integration](/developer-guide/android-sdk/push/basic/push-configuration) steps properly.

### InApps - Sync

<img src="https://mintcdn.com/moengage/lJn1dQ8d5bjpluQk/images/sync.png?fit=max&auto=format&n=lJn1dQ8d5bjpluQk&q=85&s=f57bde5ff60feb67b991243bff376884" alt="Sync" width="3456" height="880" data-path="images/sync.png" />

**Search string** - inapp/live and find get the line that has getResponse()

**Occurrence** - When the app is opened from the killed state. There are other cases when this API call is made, but we can easily kill the app and open it to see this call, so we are mentioning only this case here.

**Description**

This log line indicates that MoEngage SDK has made an API call to its backend servers to fetch the valid InApps or Nudges for the user. This API call is essential for InApps or Nudges to work as expected and depends on properly registering the lifecycle process. If you don't see this call once you open the app from killed state, go through the troubleshooting article here - [How to debug lifecycle issues.](/developer-guide/android-sdk/troubleshooting-and-faqs/troubleshooting-and-faqs#Why-is-lifecycle-process-library-important?)

### InApps - display not shown

<img src="https://mintcdn.com/moengage/LKbZnn8KNdjSphyQ/images/display.png?fit=max&auto=format&n=LKbZnn8KNdjSphyQ&q=85&s=e9836c9c495ac79e044fd2641d64cf3e" alt="Display" width="3456" height="526" data-path="images/display.png" />

**Search string** - Cannot show

**Occurrence** - This string can be seen when the MoEngage SDK can't show the InApp.

**Description**

This log line indicates that Inpps aren't shown to the user, and the reason for not showing the InApp is also mentioned at the end of the log line.

### Exceptions

<img src="https://mintcdn.com/moengage/LKbZnn8KNdjSphyQ/images/exceptions.png?fit=max&auto=format&n=LKbZnn8KNdjSphyQ&q=85&s=5be3ff5d696b785f4fd4342dd12d13d1" alt="Exceptions" width="3456" height="526" data-path="images/exceptions.png" />

While browsing through MoEngage SDK logs, you might encounter error/exception logs, as shown in the above image. It's important to ensure no such logs for smoother integration of MoEngage SDK. Kindly contact our team via support tickets to identify the fix for these issues. We are also listing some common exceptions and their fixes [here](/developer-guide/android-sdk/troubleshooting-and-faqs/troubleshooting-exceptions).
