# Enabling and viewing account audit logs

{% hint style="info" %}
Requires an Enterprise license.
{% endhint %}

Account owners can optionally enable, view, and download an audit log that track database actions and access.

## Displaying the Audit logs page <a href="#audit-log-display" id="audit-log-display"></a>

To display the **Audit Logs** page, on **Account Settings**, click **Audit Logs**. On the **Audit Logs** page:

* The **Activity** tab contains the audit log.
* The **Settings** tab provides options to enable or disable the audit log, and to set the retention period for log records.

<figure><img src="/files/7gHJKgucSBleh6gyXQuW" alt=""><figcaption><p>Audit Logs page on Account Settings</p></figcaption></figure>

## Enabling and configuring the audit log <a href="#audit-log-enable-configure" id="audit-log-enable-configure"></a>

To enable the audit log:

1. On **Audit Logs**, click **Settings**.
2. Toggle **Collect audit logs** to the on position.
3. By default, when you collect audit logs, Fabricate automatically discards records after 90 days.\
   \
   To change how long Fabricate keeps audit log records, in the **Retention period** field, type the number of days to preserve audit log records.

<figure><img src="/files/RwZAgUjEPzIW5ena6V5y" alt=""><figcaption><p>Audit logs configuration on the Settings tab of Audit Logs</p></figcaption></figure>

## Information in the Audit Log entries <a href="#audit-log-information" id="audit-log-information"></a>

On the **Activity** tab, ror each audit log entry, the list initially includes:

* Who performed the activity.
* A description of the activity.
* Where the activity was triggered from.
* When the activity occurred.

When you click an entry, Fabricate displays expanded details for the action.

<figure><img src="/files/UggllX8YYzk85XDGV3IM" alt=""><figcaption><p>Expanded details for an audit log event</p></figcaption></figure>

## Refreshing the audit log <a href="#audit-log-refresh" id="audit-log-refresh"></a>

To refresh the audit log to add recent events, click the refresh icon.

## Filtering the audit log <a href="#audit-log-filter" id="audit-log-filter"></a>

You can filter the audit log based on:

* The type of action.
* When the action occurred.
* The affected workspace.
* The affected project.
* The affected database.
* The user who performed the action.
* The Agent tool used to perform the action.
* The Agent mode in place when the action occurred.

### Displaying the filter panel <a href="#audit-log-filter-panel" id="audit-log-filter-panel"></a>

To display the filter panel, click the filter icon.

<figure><img src="/files/0VIrZ5owrLCHWdHaYCZN" alt=""><figcaption><p>Filter options panel for the audit log</p></figcaption></figure>

### Adding and removing filters <a href="#audit-log-filter-add-remove" id="audit-log-filter-add-remove"></a>

You can combine multiple filters. To add a filter:

1. Select the filter type.
2. Select the filter.

As you select each filter, Fabricate adds it to the search field. To remove a filter, click its delete icon. To remove all of the filters, on the filter panel, click **Clear all**.

<figure><img src="/files/f2M5sNSeLuAzLLTGs9mm" alt=""><figcaption><p>Audit log with added filters</p></figcaption></figure>

### Filtering by action type <a href="#audit-log-filter-action" id="audit-log-filter-action"></a>

To filter by action type:

1. On the filter panel, click **Event**.
2. In the action types list, check each action type to include.

### Filtering by the creation timestamp <a href="#audit-log-filter-creation" id="audit-log-filter-creation"></a>

To filter by when the action occurred:

1. On the filter panel, click **Created**.
2. Select the timeframe to include.

<figure><img src="/files/78L3Spf5yavcKuojLWlL" alt=""><figcaption><p>Options to filter the audit log based on when an event occurred</p></figcaption></figure>

You can select a preset time frame, such as the previous week or month.

To provide a specific time range, under **Custom range**:

1. In the **From** field, provide the start date and time.
2. In the **To** field, provide the end date and time.

### Filtering by workspace <a href="#audit-log-filter-workspace" id="audit-log-filter-workspace"></a>

To filter by the affected workspace:.

1. On the filter panel, click **Workspace**.
2. In the workspaces list, check the checkbox next to each workspace to include.

### Filtering by project <a href="#audit-log-filter-project" id="audit-log-filter-project"></a>

To filter by the affected project:

1. On the filter panel, click **Project**.
2. In the workspaces list, check the checkbox next to each workspace to include.

### Filtering by user <a href="#audit-log-filter-user" id="audit-log-filter-user"></a>

To filter by the user who performed the action:

1. On the filter panel, click **User**.
2. In the user list, check the checkbox next to each user to include.

### Filtering by Agent tool <a href="#audit-log-filter-agent-tool" id="audit-log-filter-agent-tool"></a>

To filter by the tool the Agent used to perform the action:

1. On the filter panel, click **Agent Tool**.
2. In the tool list, check the checkbox next to each tool to include.

### Filtering by Agent mode <a href="#audit-log-filter-agent-mode" id="audit-log-filter-agent-mode"></a>

To filter by the mode that Agent used to perform the action:

1. On the filter panel, click **Agent Mode**.
2. In the model list, check the checkbox next to each mode to include.

## Sorting the audit log <a href="#audit-log-sort" id="audit-log-sort"></a>

By default, the audit log is sorted in descending order by when the action occurred. The most recent actions are at the top of the list.

You can sort the list by:

* When the action occurred.
* When the action expires.
* The workspace where the action occurred.
* The project where the action occurred.
* The database where the action occurred.
* The user who performed the action.
* The account where the action was performed.

To change the sort order:

1. Click the current sort order selection.
2. From the sort dropdown list, select the parameter to sort by.

<figure><img src="/files/WPiOU0SnafdBRyqbd78E" alt=""><figcaption><p>Sort options for the audit log</p></figcaption></figure>

3. To reverse the sort order, click the sort direction button.

## Exporting the audit log <a href="#audit-log-export" id="audit-log-export"></a>

To export the currently displayed list of events:

1. Click the **Export** option at the bottom of the list.
2. From the dropdown list, select the format to use.

<figure><img src="/files/wfFJtd4nuELwSpzXBqLh" alt=""><figcaption><p>Export options for the audit log</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.tonic.ai/fabricate/fabricate-accounts-and-users/account-audit-logs.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
