Report Logs
This section covers how Instabug automatically attaches console logs, verbose logs, and all steps made by your users before a bug report is sent for Flutter apps.
Privacy Policy
It is highly recommended to mention in your privacy policy that you may be collecting logging data in order to assist troubleshooting bugs.
A variety of logs types are sent with each crash or bug report. They appear within each report in your Instabug dashboard, as shown below. Log collection stops when Instabug is shown.
We support the following types of logs:
Network Logs
Instabug automatically logs all network requests performed by your app. Requests details, along with their responses, are sent with each report. Instabug 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 1,000.
You can choose to attach all your network requests to the reports being sent to the dashboard. To enable the feature when using the dart:io
package HttpClient
, use the custom Instabug client:
InstabugCustomHttpClient client = InstabugCustomHttpClient();
You can then continue to use the package normally to make your network requests like below:
client.getUrl(Uri.parse(URL)).then((request) async {
var response = await request.close();
});
We also support the packages http
and dio
. For details on how to enable network logging for these external packages, refer to the Instabug Dart Http Adapter and the Instabug Dio Interceptor repositories.
Instabug Logs
You can log messages throughout your application's lifecycle to be sent with each report. Note that the maximum number of Instabug logs sent with each report is 1,000.
InstabugLog.logVerbose("Message to log")
InstabugLog.logInfo("Message to log")
InstabugLog.logDebug("Message to log")
InstabugLog.logError("Message to log")
InstabugLog.logWarn("Message to log")
Console Logs
Instabug 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.
User Events
Best Practices
Currently the limit of the number of user events sent with each report is 1,000. If you're planning on logging a large amount of unique data, the best practice here would be to use Instabug Logging instead. The reason for this is that having a very large amount of user events will negatively impact the performance of the dashboard.
Having a large amount of user events will not affect dashboard performance if the user events are not unique.
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.
Instabug.logUserEventWithName("OnFeedbackButtonClicked");
Updated about 5 years ago
Logs go hand-in-hand with both bug reporting, so why not give it a look? The Session Profiler feature also give you more comprehensive details alongside logs.