> For the complete documentation index, see [llms.txt](https://docs.instruqt.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.instruqt.com/tracks/manage/viewing-logs.md).

# Track logs

Inspect track logs and troubleshoot your configurations

Logs show the events that happen when users play your content, such as sandbox setup and setup scripts. Use them to troubleshoot your tracks.

## View track logs

You can view track logs using the Web UI or the Instruqt CLI.

{% tabs %}
{% tab title="🌐 Web UI" %}

1. Select **Reporting** in the left navigation, then select **Logs**. You can also open logs from a track: in the **Statistics** section of the Track Dashboard, select **Logs**.
2. Set the filters:
   * Search for a message or event
   * Sandbox or session ID
   * Severity: Error, Warning, Info or Debug
   * Date range
   * Tracks, Labs, Invites and Landing pages
3. To follow new events as they happen, turn on streaming.

The **Content** column shows whether an entry belongs to a track or a lab. For track logs, the **Sandbox ID** column shows which sandbox the event came from.

You can export logs as a JSON file or copy them to your clipboard.
{% endtab %}

{% tab title="💻 Instruqt CLI" %}

1. Run the following command to view all logs for a track:

   ```bash
   instruqt track logs <TRACK_SLUG>
   ```
2. Filter the date range of logs using the `--since` flag:

   ```
   instruqt track logs <TRACK_SLUG> --since 6h
   ```
3. Filter specific sandbox logs using the `--participant-id` flag:

   ```
   instruqt track logs <TRACK_SLUG> --since 6h --participant-id 88ewfsfsdf89
   ```

{% endtab %}
{% endtabs %}

{% hint style="info" %}
You can determine the ID of a sandbox through the `_SANDBOX_ID` environment variable, present in all Instruqt sandboxes. Simply run `echo $_SANDBOX_ID` in a terminal tab.
{% endhint %}
