# log-msg command

The log-msg command records the time
and date that a particular macro is executed.

## Syntax

```
log-msg message
```

## Description

The log entry is placed into
the dm,errors, file. This command is executed
by the power-off process and can be used within a macro (for example,
to note when the macro was executed).

## Example(s)

```
log-msg application event
sort errors by date

Page 1 errors 07:31:34 02 Feb 2003
errors.... date.. time.. r mode-addr...... user error...
867553651 10/01 14:54 Coldstart after abnormal shutdown dm (0) log-msg
867625376 10/02 07:02 Coldstart after normal shutdown dm (0) log-msg
867626224 10/02 07:17 application event dm (1) log-msg
[405] 3 items listed out of 3 items.
```
The report includes the following headings:

| errors | System-generated job number (item-ID) for this item. |
| --- | --- |
| date | Date that this error was logged. |
| time | Time that this error was logged. |
| r | Register address (0—f), which triggered the error condition (for example, forward link zero, referencing illegal frame aborts, and so on.) |
| mode-addr | Description of the error, or address of the program when it generated the error. |
| user (pib) | User-ID who was running the process along with the port number. |
| error | Process which caused this error message to be placed in the log. |

## See also

- [errors file](https://d3codex.com/systemfiles/errors-file/)
- [log-status command](https://d3codex.com/tcl/log-status-command/)
- [startlog command](https://d3codex.com/tcl/startlog-command/)
- [stoplog command](https://d3codex.com/tcl/stoplog-command/)
- [txlog command](https://d3codex.com/tcl/txlog-command/)
- [txlog-status command](https://d3codex.com/tcl/txlog-status-command/)

---
Source: https://d3codex.com/tcl/log-msg-command/ - part of the D3Codex reference.
