> For the complete documentation index, see [llms.txt](https://knowledgebase.qommentary.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://knowledgebase.qommentary.com/qommentary-writeback/advanced/audit-trails/enable-audit-trails-for-files.md).

# 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>
```
