# Logs

Keep the logs your city's scripts used to send to Discord in one place, with search, player filters and an overview of the activity.

Source: https://fivedash.fivex.gg/docs/en/logs/overview

The **Logs** module is the city's archive: everything the scripts record (who connected, who killed whom, what left the chest, who moved money) arrives here instead of going to webhook channels on Discord. FiveDash keeps every log, reads the character ID, Discord account, identifiers and coordinates from it, and makes it all searchable. This page is for the owner and the staff who handle the server's logs.

## Before you start

* **Plan:** the Logs module must be in the organization's plan. See [Plans and billing](https://fivedash.fivex.gg/docs/en/getting-started/plans-and-billing).
* **Server:** logs belong to one of the organization's FiveM servers. Without a server, the page shows **No servers yet**.
* **Initial setup:** only someone with **All logs** at the **Configure** level runs the setup. Everyone else sees **Logs haven't been set up yet** until it's done.

## How scripts send logs

Each FiveDash log (a "channel", like **Deaths and combat** or **Inventory and chests**) receives logs in one of two ways. Both work at the same time.

| Way                               | What it is                                                                                                                        | When to use it                                                                                                                                                                     |
| --------------------------------- | --------------------------------------------------------------------------------------------------------------------------------- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| **Discord webhook**               | A FiveDash link in place of the `discord.com/api/webhooks/…` link the script already uses. The rest of the script stays the same. | Ready-made scripts that already send to a webhook. See [Replace Discord webhooks](https://fivedash.fivex.gg/docs/en/logs/migrate-from-webhooks).                                   |
| **FiveDash export** (recommended) | One line of Lua on the script's server side: `exports.fivedash:log("key", { … })`. Needs the `fivedash` resource running.         | Your own scripts, or ones you can edit. Faster, and it already reads the player's character ID. See [FiveM resource](https://fivedash.fivex.gg/docs/en/developers/fivem-resource). |

## What's in the module

| Page         | Path in the panel                                 | What it shows                                                                                                         |
| ------------ | ------------------------------------------------- | --------------------------------------------------------------------------------------------------------------------- |
| **Overview** | **Logs → Overview**                               | Numbers, charts and what's arriving now.                                                                              |
| **All logs** | **Logs → All logs**                               | The explorer with every log, search and filters.                                                                      |
| Each log     | **Logs →** the log's name                         | The explorer for that log only, with **How to send**, **Send test** and **Edit log**.                                 |
| Assistant    | **Assistant** button at the top of the Logs pages | The [Logs assistant](https://fivedash.fivex.gg/docs/en/logs/assistant), which searches and explains the logs for you. |

## Overview

In **Logs → Overview** you see what the server's scripts sent in the chosen period: **24 hours**, **7 days** (default) or **30 days**.

| Block                     | What it shows                                                                                                 |
| ------------------------- | ------------------------------------------------------------------------------------------------------------- |
| **Today** / **Last hour** | How many logs arrived, compared with the hour before.                                                         |
| **Logs receiving**        | How many logs got something in the last 24 h.                                                                 |
| **Silent**                | Logs that received nothing in the last 24 h (or **All sent in the last 24 h**).                               |
| **Peak**                  | The moment with the most logs in the period.                                                                  |
| **Tests**                 | Logs sent with the test button.                                                                               |
| Chart                     | Pick the **Chart metric**: **Logs**, **Players** or **Per hour** (compared with the previous period, dashed). |
| **By log**                | Each log's share in the period and when the latest one arrived.                                               |
| **Peak hours**            | When logs arrive, by weekday and hour, Brasília time.                                                         |
| **Most active players**   | Who shows up most in the logs (counted over the period's 20,000 newest logs).                                 |
| **Most common events**    | The titles that repeat the most.                                                                              |
| **Scripts**               | Who sends: the webhook name on each log.                                                                      |
| **Arriving now**          | New logs, live.                                                                                               |

## Access levels

Access to logs is given in **Settings → Members**. The module has two areas, and you can also give **Each log** separately.

| Area            | Level         | What it allows                                       |
| --------------- | ------------- | ---------------------------------------------------- |
| **All logs**    | **View**      | Every log, including new ones                        |
| **All logs**    | **Configure** | Create logs, configure all of them and see the links |
| **Create logs** | **Manage**    | Create new logs and configure the ones they create   |
| One log         | **View**      | The entries that arrive in this log                  |
| One log         | **Configure** | Name, key, webhook link and tests                    |

> People with only **View** don't see the webhook link: with the link, anyone can send logs to the server.

## Plan limits

|                                 | Plus      | Pro        | Ultra      |
| ------------------------------- | --------- | ---------- | ---------- |
| **Webhook and resource export** | Yes       | Yes        | Yes        |
| **Logs kept for**               | 7 days    | 30 days    | 90 days    |
| **Logs received per month**     | 1 million | 10 million | 50 million |
| **Logs per server**             | 15        | 30         | 60         |

## FAQ

**Do the scripts need big changes?**
No. With the webhook, you only swap the link in the script's config. With the export, it's one line of Lua per log.

**Can I use webhook and export on the same server?**
Yes. Every log accepts both. The **How the script sends** option only changes the instructions FiveDash shows for that log.

**Are files and screenshots sent with the webhook kept?**
No. The log records how many files came (**Files**: "not kept"), but the file itself isn't saved. To keep screenshots, use the [CDN](https://fivedash.fivex.gg/docs/en/cdn/overview).

## Next steps

[Create logs](https://fivedash.fivex.gg/docs/en/logs/create-logs)Set up the logs, their links and keys.
[Replace Discord webhooks](https://fivedash.fivex.gg/docs/en/logs/migrate-from-webhooks)Point ready-made scripts to FiveDash.
[Search and filter](https://fivedash.fivex.gg/docs/en/logs/search-and-filter)Find who did what and when.
[Logs assistant](https://fivedash.fivex.gg/docs/en/logs/assistant)Ask in plain words and get the answer with the logs.
