# Logging

The Logging Admin section allows you to view information logged by NATS that you have specified. This can include tracking, signups, e-mails, and cronjobs. You can view detailed breakdowns of your logs, or search through your logs for specific results.&#x20;

## Logs Admin

<figure><img src="/files/LHBE5hLz7vrVO8ZjbHgU" alt=""><figcaption></figcaption></figure>

The Logs Admin lets you view information from various sources, which are logged by [NATS](https://tmmwiki.com/index.php/NATS) in an organized manner.

Before any information appears here, you must enable logging to the [Configuration Admin](/nats-admin/configuration.md). To do so, go to the NATS [Configuration Admin](/nats-admin/configuration.md) and select "Logging" from the Current Section drop-down menu.

Here, you will be able to enable logging for a variety of instances, including tracking, signup, e-mail, and cronjobs.&#x20;

<figure><img src="/files/2keYfXtOU4LGAePvXcra" alt=""><figcaption></figcaption></figure>

After you have enabled logging for the instances you wish to keep a record of, go back to the Logging Admin

In the Logs Admin, you will find a list of logs that have been stored by NATS, as well as three actions performable on each log.&#x20;

* **View Log** - This allows you to view a breakdown of each log in chronological order. This log display provides the line number, affiliate, entry file, entry line, and entry data of each specific log.&#x20;
* **Clean Up Log File** - Cleans up the logged files.
* **Delete Log** - Deletes the log.

{% hint style="warning" %}
**Please Note:** As of NATS Version 5.0.0.0, there will be a log generated for every individual API request originating from the NATS 5 admin interface. As of version 5.0.2.6, this will be disabled, but you can enable them again by turning off the DISABLE\_NATS5\_ADMIN\_ACTION\_LOGGING setting in the Config Admin -> Logging Section.
{% endhint %}

## Cleaning Your Logs

NATS also offers an option to clean your server's logs. Like database files, NATS will ensure that you do not remove information vital to statistics, payments, or payouts.

To clean your logs, find the logs you wish to clean up, click the Actions button beside it and click the "Clean Up Log File" option.

You will then be taken to a page where you can configure settings for your cleanup. Available settings include:

* **Cleanup By**- allows you to select whether you want to sort your cleanup by date or by rows.
  * **Rows Before** - all rows before whatever date you input will be cleaned.
  * **Keep # Rows** - input the number of rows you want to save from your cleanup process

<figure><img src="/files/VWB0IPxYP6oLfnTatFwd" alt=""><figcaption></figcaption></figure>

Once you have configured your settings, click the Start button to start your cleanup.

## Related Articles

{% content-ref url="/pages/IUHBvD0GL0BTZMuEbjfb" %}
[Configuration](/nats-admin/configuration.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.toomuchmedia.com/nats-admin/support-and-maintenance/logging.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
