---
title: Log all requests
project: OpenSync
version: 1.0
section: guides
language: en
license: MIT
url: https://totaljs.es/docs/opensync/1-0/guides/request-log/
updated: 2026-11-19T09:22:08.629Z
---

# Log all requests

> Keep a file with every message that goes through OpenSync.

With **Log all requests** on, OpenSync writes every message to the file `audit.log` in the [data folder](../../reference/data-folder/). The log holds the messages from HTTP requests and from WebSocket clients, also when no client is connected.

## Turn it on

1. On the **Setup** page, check **Log all requests**.
2. Click **APPLY**.

To stop logging, uncheck it and click **APPLY**.

## What the log looks like

Each line is one message as JSON, with an extra `dtcreated` field (the time the message was logged):

```json
{"id":"24nag001tl51d","type":"application/json","channel":"orders","method":"POST","headers":{"host":"sync.example.com","user-agent":"curl/8.7.1","accept":"*/*","content-type":"application/json","content-length":"11"},"ua":"","query":{},"body":{"id":1004},"ts":"2026-11-19T07:40:29.624Z","ip":"203.0.113.10","files":[],"dtcreated":"2026-11-19T07:40:29.624Z"}
```

The fields are described in [Message format](../../reference/message-format/). While the log is on, clients also receive `dtcreated` in their messages.

## Read the log

Show the last messages:

```bash
tail -n 20 databases/audit.log
```

The file grows with every message. Keep an eye on its size, and include it in your backups if you need the history.
