> ## Documentation Index
> Fetch the complete documentation index at: https://docs.superoffice.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Log Messages

> Database log for CRMScript

## Database log

You can write to and inspect the system log.

The date format is **YYYY-MM-DD**.

Messages are written to the log immediately: if your script should crash, everything logged up to that point is preserved.

The database log also works for scripts that redirect and for scripts that run in the background.

**Write to log:** `Void log(String msg)`

```crmscript theme={null}
log("2020 is a leap year");
```

Use `log()` as you would use `print()`.

<Tip>
  You can customize logging by adding the following URL fragment: <br /> `/scripts/ticket.fcgi?_sf=0&action=searchTable&table=log_events`
</Tip>

**Read log:**

Beside your profile picture, select the **hamburger menu**, then select **System design**. Click **Debug log** to open the **Search log** screen.


## Related topics

- [Write output](/en/automation/crmscript/fundamentals/output.md)
- [Void](/en/automation/crmscript/reference/CRMScript.Global.Void.md)
- [Create a custom logger](/en/onsite/logging/create-custom-logger.md)
- [Create and update requests](/en/automation/crmscript/howto/request/create.md)
- [Logs](/en/automation/crmscript/howto/request/request-logs.md)
- [Enum TicketLogAction](/en/automation/crmscript/reference/CRMScript.NetServer.TicketLogAction.md)
