---
name: "diag_log"
type: command
status: ok
groups: ["Diagnostic"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/diag_log
revid: 379412
updated: 2026-10-31T00:03:05Z
---

# diag_log

*Command · Diagnostic · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Dumps the argument's value to the report file. Each call creates a new line in the file.

## Syntax

```sqf
diag_log output
```

**Parameters:**

- `output`: [Anything](../topics/Anything.md)

**Returns:** [Nothing](../topics/Nothing.md)

## Examples

### Example 1

```sqf
diag_log time;
```

### Example 2

```sqf
diag_log format ["%1, %2", player, time];
```

### Example 3

```sqf
_array = [1, "foo", player, "bar"];
{
    diag_log _x;
} forEach _array ; // creates 4 entries on 4 lines
```

### Example 4

```sqf
_array = [1, "foo", player, "bar"];
diag_log _array; // Creates one entry of e.g. [1,"foo",B Alpha 1-1:1 (Player Name),"bar"]
```

## See also

arma.RPT · [diag_dumpCalltraceToLog](../commands/diag_dumpCalltraceToLog.md) · [diag_stacktrace](../commands/diag_stacktrace.md) · [copyToClipboard](../commands/copyToClipboard.md) · [copyFromClipboard](../commands/copyFromClipboard.md) · [diag_fps](../commands/diag_fps.md) · [diag_fpsMin](../commands/diag_fpsMin.md) · [diag_frameNo](../commands/diag_frameNo.md) · [diag_tickTime](../commands/diag_tickTime.md) · [diag_deltaTime](../commands/diag_deltaTime.md)

## Community notes

**Master85** — 2009-06-08

To dump a string without "" use [text](../commands/text.md).

---

**Demonized** — 2011-04-19

in patch 1.59 there is a limit of 1044 characters to be printed, no error or crash but diag_log line will simply end at character number 1044.

<sub>Source: [BI Community Wiki — diag log](https://community.bistudio.com/wiki/diag_log) (revision 379412).</sub>
