> For the complete documentation index, see [llms.txt](https://docs.kojascripts.eu/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.kojascripts.eu/jobs/trucker/configuration/admin/logs.md).

# Logs

## Channels

| Channel     | Logs                                                                                 |
| ----------- | ------------------------------------------------------------------------------------ |
| `orders`    | Completed deliveries — driver, route, category, reward, XP, distance, time, company. |
| `companies` | New companies — name, tag, owner, identity.                                          |
| `skills`    | Skill purchases — player, skill, level, cost.                                        |
| `anticheat` | Suspicious activity — reason, detail, full player identity.                          |

## Setting webhook URLs

Webhook URLs are kept **server-side** (never sent to clients). Set them either in `server.cfg` via convars (recommended — keeps secrets out of the resource) **or** in `data/config.json`. A convar always overrides the config value.

```cfg
setr koja_trucker_webhook_orders    "https://discord.com/api/webhooks/..."
setr koja_trucker_webhook_companies "https://discord.com/api/webhooks/..."
setr koja_trucker_webhook_skills    "https://discord.com/api/webhooks/..."
setr koja_trucker_webhook_anticheat "https://discord.com/api/webhooks/..."
setr koja_trucker_webhook_default   "https://discord.com/api/webhooks/..."
```

If a channel's URL is empty, the **`default`** webhook is used as a fallback. If both are empty, that log is silently skipped.

## Toggling logs

In **Admin → Settings → Discord logging** you can:

* turn **all logging** on/off,
* turn **anti-cheat alerts** on/off,
* tune the anti-cheat thresholds.

## Anti-cheat heuristics

A flag is raised (and an alert posted) when a player:

| Heuristic                        | Default trigger                               |
| -------------------------------- | --------------------------------------------- |
| Completes away from the drop-off | Position check fails (also blocks the payout) |
| Finishes a real route too fast   | `< min_seconds_per_order` (20 s)              |
| Completes too many orders        | `> max_orders_per_10min` (8) in 10 min        |
| Levels up too fast               | `> max_levels_per_min` (5) in 60 s            |


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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.kojascripts.eu/jobs/trucker/configuration/admin/logs.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.
