> For the complete documentation index, see [llms.txt](https://codemash.gitbook.io/codemash/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://codemash.gitbook.io/codemash/cloud/logs/settings.md).

# Settings

Change the log filters and save them, delete all stored logs, and turn the Logs module off and on again.

**Where:** Logs → **Settings** · `/projects/<project>/logging/settings`

The Logs settings screen has three panels: **Log filters** (two switches that make the stored entries smaller), **Clean** (delete every entry Norbix Logging stores) and **Disable logs module**.

<figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-3a34f89a1f358521f87e3b7e9e70cc57e4a7bc6c%2Fsettings-1.png?alt=media" alt="Logs settings: the panels Log filters with two check boxes and Save settings, Clean with a yellow warning and the red Clean all logs button, and Disable logs module with the Disable module button"><figcaption><p>The three panels of Logs → Settings.</p></figcaption></figure>

## Before you start

* Changing the filters needs the `logging:manage` permission on the **settings**; **Clean all logs** needs `logging:delete`; turning the module off needs `logging:manage` on the module (for example **Owner** or **Administrator** has all three).
* The filters and **Clean** work on the [Norbix Logging](/codemash/cloud/logs/integrations/providers/norbix-logging.md) integration. Without one, the filters panel shows *Norbix Logging is not enabled* (the switches are saved but do nothing yet) and the **Clean** panel is hidden.

## Steps

**Change the log filters and save them**

1. Under **Log filters** (*Both flags default OFF — everything is logged.*), tick what you want to leave out:

   | Field                                   | Required | What it does                                                                                                                                                                   | Example |
   | --------------------------------------- | -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | ------- |
   | Skip Cloud dashboard logging            | no       | Meant to drop the entries of requests made by Cloud itself, so your own clicks do not hide your app's entries. See the warning below.                                          | off     |
   | Skip request/response body in HTTP logs | no       | Keeps the `http:request` / `http:response` entries but removes the `request.*` and `response.*` keys from their metadata — smaller entries, but no request body to debug with. | on      |
2. Press **Save settings**. The text **Settings saved.** appears under the button.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-ad5b2f68ed12f6adb18435d097a73541b1152777%2Fsettings-2.png?alt=media" alt="Log filters with Skip Cloud dashboard logging ticked and the text Settings saved. under the Save settings button"><figcaption><p>The filters are saved.</p></figcaption></figure>

{% hint style="warning" %}
**Skip Cloud dashboard logging** is saved but does not drop anything today: on the test project, requests from Cloud were still logged after the switch was on. Leave it off. **Skip request/response body in HTTP logs** works — after about a minute, new `http:response` entries keep only `http.method`, `http.path`, `http.status`, `operationName` and `durationMs`.
{% endhint %}

**Delete all stored logs**

3. In the **Clean** panel, read the warning *This only removes logs in the Norbix Logging integration* — entries already sent to other integrations are not touched. Press **Clean all logs**.
4. The dialog **Delete all logs** says *This permanently removes every log entry stored by the Norbix Logging integration. The integration itself and its retention setting are kept. This cannot be undone.* Press **Delete**.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-5ff4eb34003a2ae9f7a388f1895ddfb641cfa8ff%2Fsettings-3.png?alt=media" alt="The dialog Delete all logs with its text and the buttons Delete and Cancel"><figcaption><p>The confirmation dialog of Clean all logs.</p></figcaption></figure>

**Turn the module off**

5. In the **Disable logs module** panel, press **Disable module**. The dialog **Disable this module?** says *Are you sure? The module and all the data that belongs to it will be deleted. This cannot be undone.* Press **Disable module** in the dialog.

   <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-2dd2a2e508ac9d9995523dbe2df28fe745003b05%2Fsettings-6.png?alt=media" alt="The dialog Disable this module? with the buttons Disable module and Cancel over the settings panels"><figcaption><p>The confirmation dialog of Disable module.</p></figcaption></figure>

## Result

* **Save settings** — the filters apply to new entries within about a minute (Norbix keeps the integration list of a project for up to one minute).
* **Clean all logs** — the panel says **Logs cleaned.** The [Logs](/codemash/cloud/logs/logs.md) list starts again with the entries written after the clean, for example `CleanTenantLogsCommand completed`.

  <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-30ea9dff6d6538cf3815c11f48b4a6c0d01b1147%2Fsettings-4.png?alt=media" alt="The Clean panel with the text Logs cleaned. under the Clean all logs button"><figcaption><p>After Clean all logs.</p></figcaption></figure>

  <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-c2c2c7ec8c73dede6838b752e0ef92ddd191f9c0%2Fsettings-5.png?alt=media" alt="The Logs list after the clean: only the newest entries, among them POST /v3/logs/clean -> 200 and CleanTenantLogsCommand completed"><figcaption><p>The Logs list right after the clean.</p></figcaption></figure>
* **Disable module** — Cloud goes back to the **Norbix Logs** page. The card now says **Re-enable logging**: *Logging integrations are kept from before.*

  <figure><img src="https://712692422-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FHy372bqsaex2cqS3ikhL%2Fuploads%2Fgit-blob-7ef517f11e49ecda3220ea978f226319b7750078%2Fsettings-7.png?alt=media" alt="The Norbix Logs page after Disable module, with the card Re-enable logging and the ENABLE LOGS button"><figcaption><p>After Disable module: the page to enable it again.</p></figcaption></figure>

{% hint style="warning" %}
Disabling a module never deletes data — that is by design: your data is kept and comes back when you enable the module again. Data is deleted only through the **Compliance** settings (personal data of a person) or by [deleting the project](/codemash/cloud/project/settings/termination.md). The panel and the dialog still say the data *will be deleted*; that text is wrong and is being corrected. Today the module switch also does not stop capturing — to stop it, [disable the integration](/codemash/cloud/logs/integrations/disable.md); to remove the entries, use **Clean all logs** above.
{% endhint %}

## Change or remove it later

* **Change the filters again** — untick a switch and press **Save settings**.
* **Enable the module again** — open **Logs** in the left menu and press **ENABLE LOGS** (the check box for a new Norbix Logging integration is shown only the first time). Cloud opens the Logs list.
* **Retention** — how long entries are kept is set on the [Norbix Logging integration](/codemash/cloud/logs/integrations/providers/norbix-logging.md), not here.

## Do it from code

```ts
const now = await norbix.hub.logs.getLogSettings();
console.log(now.skipCloudDashboardLogs, now.skipHttpBodyMeta, now.hasNorbixLogging);
await norbix.hub.logs.saveLogSettings({
  skipCloudDashboardLogs: false,
  skipHttpBodyMeta: true,
  aiChatLoggingEnabled: now.aiChatLoggingEnabled, // keep the value Cloud does not show
});

await norbix.hub.logs.cleanLogs();

await norbix.hub.logs.disableLogging();
// …later: turn it on again, keep the integrations you have
await norbix.hub.logs.enableLogging({ createNorbixLogging: false });
```

```sh
norbix hub logs log settings save --skipCloudDashboardLogs false --skipHttpBodyMeta true --aiChatLoggingEnabled false
norbix hub logs clean --yes
norbix hub logs logging disable --yes
norbix hub logs logging enable --createNorbixLogging false
```

The settings call also takes `aiChatLoggingEnabled` (entries for AI chat turns), which Cloud does not show; each save sends all three values. The client setup is on the [Logs page](/codemash/cloud/logs.md#use-it-from-code). API: [Get Log Settings](/codemash/api-reference/logs/settings/get-log-settings.md) · [Save Log Settings](/codemash/api-reference/logs/settings/save-log-settings.md) · [Clean Logs](/codemash/api-reference/logs/clean/clean-logs.md) · [Disable Logging](/codemash/api-reference/logs/module/disable-logging.md) · [Enable Logging](/codemash/api-reference/logs/module/enable-logging.md)
