# InsightsLogs

## appmixer.ui.InsightsLogs

![](https://4163739060-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LATDgYqVMe0hChW7efU%2F-LvpPdnx2SUYbEv_XBuP%2F-LvpShEkMIzQempeCIOO%2FScreenshot%202019-12-11%20at%2015.56.59.png?alt=media\&token=adbd0d82-f8a6-4bc4-b139-a0ddd74e15f8)

![](https://4163739060-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-LATDgYqVMe0hChW7efU%2F-LvpPdnx2SUYbEv_XBuP%2F-LvpSrIfHJYzcVD_5FPP%2FScreenshot%202019-12-11%20at%2015.57.48.png?alt=media\&token=ce88c6aa-56b0-46e7-a2a4-e4abde294027)

The appmixer.ui.InsightsLogs is a UI widget that displays logs and histogram of all messages that passed through the user's flows. It can display logs of one flow or combine logs of all the user's flows.

| Method                             | Description                                                                                                                                                                                                                                                                                          |
| ---------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `appmixer.ui.InsightsLogs(config)` | Constructor function that accepts `config` object. The `config` object must contain at least the `el` property that points to a container DOM element where the InsightsLogs will be rendered.                                                                                                       |
| `set(property, value)`             | Set a property value. Currently only "flowId" is supported. Use it to set the flow for which you want to display logs. If you don't set the "flowId", logs of all the flows of the user will be displayed.                                                                                           |
| `get(property)`                    | Get a property value.                                                                                                                                                                                                                                                                                |
| `open()`                           | Render the InsightsLogs inside its container.                                                                                                                                                                                                                                                        |
| `close()`                          | Close the InsightsLogs.                                                                                                                                                                                                                                                                              |
| `state(name, value)`               | Change the state of the UI. Currently, only `"loader"` and `"error"` states are supported. For example, in order to show a loader in the flow manager UI, just call `state("loader", true)`. If you want to display an error in the flow manager UI, call `state("error", "Something went wrong.")`. |
| `reload()`                         | Refreshes the InsightsLogs. Since the UI contains a way to reload flows, calling this can be useful only when any flows has changed, so the changes are reflected in the flows filter.                                                                                                               |

##
