# Logging

## Logging

### SQL Logging

All events are stored in your database automatically.

#### elena\_airdrop\_logs

Stores all events including spawn, loot, despawn and admin actions.

| Column          | Type      | Description       |
| --------------- | --------- | ----------------- |
| type            | VARCHAR   | Event type        |
| identifier      | VARCHAR   | Player identifier |
| player\_name    | VARCHAR   | Character name    |
| airdrop\_id     | VARCHAR   | Unique drop ID    |
| airdrop\_type   | VARCHAR   | Loot tier         |
| location\_x/y/z | FLOAT     | Coordinates       |
| loot\_data      | LONGTEXT  | JSON loot details |
| timestamp       | TIMESTAMP | Event time        |

#### elena\_airdrop\_stats

Per-player statistics.

| Column                 | Type    | Description             |
| ---------------------- | ------- | ----------------------- |
| identifier             | VARCHAR | Player identifier       |
| total\_looted          | INT     | Total crates opened     |
| common\_looted         | INT     | Common crates opened    |
| rare\_looted           | INT     | Rare crates opened      |
| legendary\_looted      | INT     | Legendary crates opened |
| total\_items\_received | INT     | Total items received    |

#### elena\_airdrop\_anticheat

Anti-cheat violation records.

| Column          | Type     | Description       |
| --------------- | -------- | ----------------- |
| identifier      | VARCHAR  | Player identifier |
| violation\_type | VARCHAR  | Type of violation |
| details         | LONGTEXT | JSON details      |

#### Disable SQL Logging

```
Config.SQLLog = {
    Enabled = false,
}
```

### Discord Logging

Webhook messages are sent for each event type.

#### Setup

Create a webhook in your Discord channel. Copy the webhook URL. Paste in config:

```
Config.Discord = {
    Enabled = true,
    Webhook = 'https://discord.com/api/webhooks/...',
    BotName = 'Elena Airdrop',
}
```

#### Log Types

Enable or disable specific log types:

```
LogTypes = {
    spawn = true,
    loot = true,
    despawn = true,
    anticheat = true,
    admin = true,
}
```

#### Embed Format

Each log is sent as a Discord embed with color coded by loot tier, player name and identifier, airdrop ID and type, coordinates, item list for loot events, and timestamp.


---

# 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://elena-scripts.gitbook.io/elenascripts/core-systems/airdrop/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.
