Report Logs for Android

This section covers how Luciq automatically attaches console logs, verbose logs, and all steps made by your users before a bug report is sent for Android apps.

Privacy Policy

A variety of log types are sent with each crash or bug report. They appear within each report in your Luciq dashboard, as shown below. Log collection stops when Luciq is shown.

We support the following types of logs:

  • User Steps

  • Network Logs

  • Luciq Logs

  • Console Logs

  • User Events

An example of the expanded logs view from your dashboard.

User Steps

Luciq can help you reproduce issues by tracking each step a user has taken until a report is sent. Note that the maximum number of user steps sent with each report is 100.

User Steps are formatted as follows: Event in text/viewID of type class in parentView.

  • The type of events captured are tap, double tap, long press, swipe, scroll and pinch.

  • text/viewID refers to the text or the ID of the object that contains the event.

  • Class refers to the class of the object that contains the event.

  • ParentView refers to the view that contained the event.

An example of the expanded logs view filtered by User Steps.

User steps collection can be disabled by using the following API:

Network Logs

Luciq automatically logs all network requests performed by your app from the start of the session. Requests details, along with their responses, are sent with each report. Luciq will also show you an alert at the top of the bug report in your dashboard when network requests have timed-out or taken too long to complete. Note that the maximum number of network logs sent with each report is 100.

An example of network request logs in the Luciq dashboard.

Logging HttpUrlConnection requests

To log network requests, use LuciqNetworkLog then use the following method at the HttpUrlConnection, requestBody and responseBody.

For a more detailed example, see the following network request.

Logging Okhttp requests

First, you will need to compile Luciq with a network interceptor.

To log Oktthp requests, use the LuciqOkhttpInterceptor as shown in the following example.

Modifying Requests

In the event that you need to modify a network request prior to sending it to the dashboard, you can follow the below steps:

1- Create a NetworkLogListener object and modify the captured network log as shown below.

2- Register the created NetworkLogListener to your LuciqOkHttpInterceptor object. This can be done through two different methods:

a. Pass it in the constructor.

b. Call registerNetworkLogsListener method on LuciqOkhttpInterceptor object.

In case you need to remove the network listener, you can use the below method:

Luciq Logs

You can log messages throughout your application's lifecycle to be sent with each report. LuciqLog works just like the regular Log class you use to show colorful logs in your logcat. Note that the maximum number of Luciq logs sent with each report is 1,000.

Console Logs

Luciq captures all console logs and displays them on your dashboard with each report. Note that the maximum number of console logs sent with each report is 1,000 statements with a limit of 5,000 characters for each statement.

To disable console logs.

User Events

Best Practices

You can log custom user events throughout your application and they will automatically be included with each report. Note that the maximum number of user events sent with each report is 1,000.

Last updated