> ## Documentation Index
> Fetch the complete documentation index at: https://superofficeas-bugfix-ty-screen-designer-paradox.mintlify.site/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.
