# File audit trailing

To enable audit logs for files

1\. Open the properties panel and click on the Data Connections section

<div align="left"><img src="/files/-MYtQCKCjuOeqcLi0mqS" alt=""></div>

{% hint style="warning" %}
You need to set up a connection before enabling logs
{% endhint %}

2\. Go to the *Enable audit logs* option

<div align="left"><img src="/files/-MYtQxMfgQgCLJMWU89x" alt=""></div>

3\. Click on the switch control to enable audit logs

<div align="left"><img src="/files/-MYtRICgXZ5xrP9OGg-n" alt=""></div>

Once you start adding data, a folder with the name **Audit\\\[File name]\\** will be created under the path related to the connection. (e.g. if your connection points to C:\test\writeback folder and the file name is **Customers**, the audit logs will be stored in the *C:\test\writeback\Audit\Customers* folder)

A new log file will be created per day to avoid performance issues in reading big files.

<div align="left"><img src="/files/-MYtSwwlSPiGArA8Sj04" alt=""></div>

The audit log files contain a similiar structure as the original file with 3 additional XML nodes: ActionAt, ActionBy and ActionType.&#x20;

| XML Node       | Description                                                      |
| -------------- | ---------------------------------------------------------------- |
| **ActionAt**   | Date and time when the action was performed                      |
| **ActionBy**   | Which user performed the action (UserDirectory\UserId)           |
| **ActionType** | What action was performed  ( C = create, U = update, D= delete ) |

In the example below you can see an entry for the Customers audit log XML file.

```markup
	<Row>
		<Id xsi:type="string">ABC001</Id>
		<Name xsi:type="string">Micheal Smith</Name>
		<Date/>
		<ActionAt xsi:type="dateTime">2021-04-22T11:58:25.684+00:00</ActionAt>
		<ActionBy xsi:type="string">QOM\jdean</ActionBy>
		<ActionType xsi:type="string">C</ActionType>
	</Row>
```


---

# 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://knowledgebase.qommentary.com/qommentary-writeback/advanced/audit-trails/enable-audit-trails-for-files.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.
