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

# Console Log Capture — Attach Browser Logs to Tickets

> Enable console log capture to automatically attach browser console output to tickets, giving your developers instant context on errors and warnings.

When a user reports a bug, your developers often need to know what was happening in the browser at that moment — not just what the user saw, but what errors or warnings were firing underneath. Console log capture solves this by recording the browser's console output and attaching it to the ticket at the moment the user submits feedback. Your developers get the logs without asking the user to open DevTools and copy anything manually.

## Enabling console log capture

<Steps>
  <Step title="Open Settings → Widget">
    In your NOCK Dashboard, click **Settings** in the sidebar and select the **Widget** tab.
  </Step>

  <Step title="Enable Console Log Capture">
    Find the **Console Log Capture** toggle and switch it on.
  </Step>

  <Step title="Select the log levels to capture">
    Choose which severity levels NOCK should collect. See the log levels section below for guidance on which to enable.
  </Step>

  <Step title="Save your changes">
    Click **Save**. Console logs will be attached to all tickets submitted from this point onward.
  </Step>
</Steps>

## Log levels explained

NOCK can capture four log levels. You can enable any combination of them.

| Level        | What it captures                                               | When to enable it                                                          |
| ------------ | -------------------------------------------------------------- | -------------------------------------------------------------------------- |
| **Errors**   | `console.error(...)` calls and unhandled JavaScript exceptions | Almost always — errors are the most actionable for debugging               |
| **Warnings** | `console.warn(...)` calls                                      | Recommended — warnings often signal deprecated APIs or near-failure states |
| **Info**     | `console.info(...)` and `console.log(...)` calls               | Useful if your app emits structured info logs you'd want to trace          |
| **Verbose**  | `console.debug(...)` and verbose-level output                  | Only enable if you need deep tracing — this can produce a lot of data      |

<Tip>
  Start with **Errors** and **Warnings** only. You can add **Info** later if you find that error-level output alone doesn't give your team enough context.
</Tip>

## Privacy considerations

Console log capture records everything your application writes to the browser console at the enabled log levels. Before turning this on, review what your codebase logs.

<Warning>
  Do not log sensitive data — such as authentication tokens, passwords, personal user information, or payment details — to the browser console. If your application currently logs any of this, sanitize those log statements before enabling console log capture in NOCK.
</Warning>

Captured logs are stored as part of the ticket and are visible to anyone in your project who can view tickets. Treat them with the same care as any other user-submitted data.

## How logs appear in the Dashboard

When you open a ticket that has console logs attached, a **Console Logs** section appears in the ticket detail panel. Each log entry shows:

* The log level (Error, Warning, Info, Verbose)
* The log message
* A timestamp relative to when the widget was opened

You can scroll through the log list or search within it to find the entry most relevant to the reported issue.

## Disabling or limiting console log capture

To turn off console log capture entirely, go to **Settings → Widget**, toggle **Console Log Capture** off, and save. No logs will be collected on future submissions.

To reduce the volume of data collected without fully disabling the feature, return to the log levels selector and uncheck the levels you no longer need — for example, turn off **Info** and **Verbose** while keeping **Errors** and **Warnings**.

<CardGroup cols={2}>
  <Card title="Screenshots and Images" icon="image" href="/widget/screenshots-and-images">
    Learn how users can attach screenshots alongside console logs.
  </Card>

  <Card title="Configure the Widget" icon="sliders" href="/widget/configure-widget">
    Review all widget settings in one place.
  </Card>
</CardGroup>
