# Logs and debugging

Logs provide you with information on how actions are executed. Once you run an action, you can check out the **Logs** tab at the bottom to access this data.

Here, you can switch views depending on the log levels you need or just manually select specific levels:

* **Default logs level** - Log, Info, Warn, Error
* **Full logs level** - default plus Verbose

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FR1tLrGxJrcb5ee0k739z%2FCleanShot%202024-11-27%20at%2013.12.57%402x-min.png?alt=media&#x26;token=90c358fc-e033-4f2f-88d3-a1029faf9f5d" alt=""><figcaption></figcaption></figure>

## Debugging actions with `console.log`

When working with the code, it's important to be able to debug it right away. You can add a `console.log` function to your code and troubleshoot right in the **Logs** tab, with no need to open the browser developer console.

Let's say you have a transformer function that is not working properly, and you want the user with the customer number 103 to have a correct value. Add the following `console.log` function to your code, run the action and check the **Logs** tab:

```javascript
return data.map(item => {
  if (item.customerNumber === 103) {
    console.log('Customer #103', item);
  }
  return item;
});
```

![](https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2FPJb3PMv0jnn5rxaMzPdE%2FCleanShot%202024-11-27%20at%2013.52.41%402x-min.png?alt=media\&token=86383401-6d1b-453c-8a64-406e4b5b6b80)

Now, you can see the result of your `console.log` function in the Logs tab. You can use the same approach and debug your code directly in the app, without the need to open the developer console.

Besides the `console.log` , other standard functions are supported as well, such as `console.info`, `console.warn` and `console.error`.

## Debugging actions performance

You can find details about the action's performance, for example its response time, in the **Result** tab. Simply hover over the question mark icon next to the **Request time** metric.

<figure><img src="https://837703843-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FUX6zPRMFFK0yrTghj7cY%2Fuploads%2Ffx9scQKchWtFbTV1YtMV%2FCleanShot%202024-11-27%20at%2014.18.51%402x-min.png?alt=media&#x26;token=646e1cb2-16df-41e5-920f-9f7957b7dfec" alt=""><figcaption></figcaption></figure>

{% hint style="info" %}
Tooltips are available for all data source-based actions.
{% endhint %}

The following metrics are available:

* **Request time** - total time taken to make the request
* **Response size** - the size of the response returned by the server
* **Request sent** - time taken to upload the request to the UI Bakery server
* **Data source roundtrip** - time to send the request from the UI Bakery server to your data source and receive the result back to the UI Bakery server
* **Content download** - time to download the response from the UI Bakery server to a user browser

### UI Bakery performance limits

The following limits are fixed for the cloud version, but can be set up in the on-premise version.

| **Response size**       | 25MB       |
| ----------------------- | ---------- |
| **Request size**        | 50MB       |
| **Timeout**             | 90 seconds |
| **Requests per second** | 3          |
