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

# Network logs

Gleap allows you to monitor all network requests for a better understanding of what's happening within your apps.

### **Enable network logs**

Simply enable the network logs within the visual widget configurator and add the Flutter Gleap Interceptor to your http client.

### **Configure network logs in Flutter**

We support network logging for the packages [Http](https://pub.dev/packages/http) and [Dio](https://pub.dev/packages/dio). For details on how to enable network logging for these packages, check the [Gleap Http Interceptor](https://pub.dev/packages/gleap_http_interceptor) and the [Gleap Dio Interceptor](https://pub.dev/packages/gleap_dio_interceptor) packages.

### **Gleap Http Interceptor**

Simple add the [Gleap Http Interceptor](https://pub.dev/packages/gleap_http_interceptor) package to your dependencies and attach the `GleapHttpInterceptor()` to your http client.

```dart theme={null}
Client client = InterceptedClient.build(interceptors: [
    GleapHttpInterceptor(),
]);

client.get(Uri.parse("https://example.com"));
```

### **Gleap Dio Interceptor**

Simple add the [Gleap Dio Interceptor](https://pub.dev/packages/gleap_dio_interceptor) package to your dependencies and attach the `GleapDioInterceptor()` to your http client.

```dart theme={null}
Dio dio = Dio();
dio.interceptors.add(GleapDioInterceptor());

dio.get("https://example.com")
```

## Filtering network logs

Gleap allows you to strip off specific key/value pairs from network logs. This empowers you to easily remove sensitive data like `tokens, passwords` or `usernames`.

### How does it work?

Log in to the [Gleap dashboard](https://app.gleap.io) and open the visual widget configurator. Now enable the `network log filters` option (within the advanced options tab). Once the option is enabled, you can add multiple keys to the array bellow, which should be excluded.

All keys, which you add to the exclusion list, will be loaded together with the widget configuration. Before sending a feedback item to our backend, the client SDK will loop through all network requests and stripe off all matching key/value pairs from the `request headers`, `header-payload` (if it's a JSON) and `response body` (if it's a JSON).

This ensures that sensitive information will never even leave the client application.

#### Example:&#x20;

If you want to remove the Authorization bearer token from your requests, simply add "Authorization" to the list of keys.

<img src="https://mintcdn.com/gleap-1d346ffa/MCCg3Pia7IrMFFzd/images/Consolelogsnew.png?fit=max&auto=format&n=MCCg3Pia7IrMFFzd&q=85&s=376495f49a84ffaa6c4ed561e0795130" alt="Network log filters" width="2800" height="1520" data-path="images/Consolelogsnew.png" />

### Set filter with code

It's also possible to set the network log filters by code.

```javascript theme={null}
// Manually set the network logs filters
Gleap.setNetworkLogPropsToIgnore(
    blacklist: ["api-key", "user.password", "..."]
)
```

## Blacklisting URLs

It is possible to blacklist URLs or parts of URLs. If a network request matches one of the entries in the blacklist, the network request won't be included in the network logs.

To add a new entry to the blacklist, simply navigate to your project in the [Gleap dashboard](https://app.gleap.io) and open the visual widget configurator. Now click on `Developer options` and add the desired URLs.

### Set blacklist with code

It's also possible to set the network log blacklist by code.

```javascript theme={null}
// Manually set the network logs blacklist
Gleap.setNetworkLogsBlacklist(
    networkLogPropsToIgnore: ["https://api.gleap.io", "..."]
)
```
