---
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: 351628
updated: 2023-12-11T19:47:08Z
---

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

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