# The log files

This page is about the files the server writes on its own disk: which there are, where they are, how they are named, and how long they stay. The settings for all of it are in [Preferences, Logging](Prefs-Logging.md).

## Where they are

In the server's folder, unless you moved them:

```
CrushMFT.log                    the log, as it is being written
logs/
  CrushMFT.log_20261120_000000.log    yesterday's, and older
  session_logs/
    26112021/                   a folder per hour: year, month, day, hour
      session_FTP_333.log       one file per session
  jobs/
    Daily_report_copy_lnNZKXUBTZkK2wRFPkxx.log     one file per job run
  audit/
    user.log                    who changed which user
  archived_history/             finished job runs
rbac_audit.log                  what the access rules decided
```

## The log

`CrushMFT.log` is the server's own account of what it does. A line looks like this:

```
POST|11/20/2026 19:20:11.060|[HTTP:17_50223_D05:crushadmin:127.0.0.1] READ: *GET /WebInterface/... HTTP/1.1*
```

| Part | Is |
|---|---|
| `POST` | the kind of line. Kinds can be switched on and off: [What is logged](Prefs-Logging-Events.md). |
| the date and time | to the millisecond |
| in brackets | the protocol, the session, the user and the address |
| the rest | what happened |

How much is written is the **Log debug level**:

| Level | Writes | Use |
|---|---|---|
| 0 | what happened | everyday |
| 1 | also errors with what led to them | when something is odd |
| 2 and up | very much, including what clients sent | to find a fault, for as short a time as possible |

> [!WARNING]
> At level 2 and above the log can hold file names, form fields, and with some protocols what a user typed. Turn it up to find a fault and back down afterwards, and treat such a log as confidential. See [What the log may reveal](Security-Log-Privacy.md).

**Filter log messages matching** leaves lines out by pattern, for a line that fills the log and tells you nothing: a monitoring probe every five seconds, for example.

The log is read in the admin pages under [Log](Admin-Log.md), live, with a search.

## Rolling

Once a day, at **Log roll time** (midnight unless you change it), the log is closed, moved into `logs` under a name with the date, and a new one is begun:

```
CrushMFT.log_20261120_235910.log
```

| | Unless you change it |
|---|---|
| rolled | daily, at 00:00 |
| or by size | off; then at 10 MB |
| kept | 30 rolled files |

With daily rolling and 30 files, that is a month of logs. With rolling by size on a busy server, 30 files can be an afternoon: check what your numbers mean in days.

## Session logs

With **Keep separate session logs** on, every session also gets a file of its own, with exactly the lines of that session. They are in a folder per hour, `26112021` being 20 November 2026, 21:00.

They are what to send a partner who asks "what did your server see when I connected at ten past nine?": one small file, with nobody else's lines in it.

The admin pages show a session's log from the list of connected users: see [Status](Admin-Status.md).

In jobs and mail templates, `{session_log}` is the log of the session in hand.

## Job logs

Every job run writes a log of its own into `logs/jobs`, named after the job and the run: `{scheduleName}_{id}.log`. They are read in the [Jobs](Jobs-Running.md#the-log-of-a-run) app.

## How long things are kept

| | Kept, unless you change it | Set by |
|---|---|---|
| the log | 30 rolled files | **Keep how many files** |
| session logs | 7 days | **Recent session logs** |
| job logs | 7 days | **Recent job logs** |
| the record of job runs that the Jobs app shows | 7 days | **Recent job history** |
| the activity record that reports read | 3 years of events, 10 of totals | [Preferences, Reporting](Prefs-Reporting.md#retention) |

Seven days for session logs is short for a server under an audit rule. PCI DSS, for one, asks for a year of logs with three months at hand. Either raise the days, or, better, send the events to a log server that is built for keeping: see [Syslog](Logging-Syslog.md) and [SIEM formats](Logging-SIEM.md).

## Room on the disk

- The log of a busy server can be some hundred megabytes a day at level 0, and gigabytes at level 2.
- The alert **Disk Space Below Threshold** watches the disk the logs are on: [Alerts overview](Alerts.md).
- A full disk stops the log, and soon after the server. Put `logs` on a disk with room, or one of its own: **Log file location and name** and **User session log location** take any path.

## A buffer for very busy servers

**Log buffer memory** lets the server gather lines in memory and write them in blocks. It makes a very busy server faster. The price: after a crash the last lines are missing, exactly the ones you would want. Leave it at 0 unless the log is shown to be a brake.

## Reading logs with other tools

The log is plain text, one event per line, with `|` between the kind, the time and the text. `grep` and its relatives work on it as it is.

For a tool that should understand **who did what**, do not parse this file: let the server send events in a format made for it. See [SIEM formats](Logging-SIEM.md).

## Things to know

- **Passwords** are masked where a line of the everyday log would hold one. At level 2 and above that cannot be relied on for everything a client sends: see [What the log may reveal](Security-Log-Privacy.md).
- **Changing the level or the kinds** counts from the next line on, without a restart.
- **A support case** usually needs the log at level 2 around the time of the fault, and the session log of the connection. Reproduce the fault, save the files, and turn the level down.
