> For the complete documentation index, see [llms.txt](https://documentation.rcore.cz/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://documentation.rcore.cz/paid-resources/rcore_housing/integrations/logs.md).

# Logs

`rcore_housing` ships with a built-in logging system that hooks into every major property event. Logs can be sent to **ox\_lib** (and from there to any service ox\_lib supports, such as Fivemanage or Datadog) and/or **Discord** webhooks.

Edit `rcore_housing/sconfig.lua` to configure logging.

## Services

Enable or disable each logging backend independently:

```lua
Config.Logs.Service = {
    ["ox_lib"]  = true,   -- route logs through ox_lib's logger
    ["discord"] = false,  -- send logs as Discord webhook embeds
}
```

You can enable both at the same time — each event is dispatched to every active service.

## Discord

When the `discord` service is enabled, embeds are sent to the webhook URL below:

```lua
Config.Logs.Discord = {
    Webhook  = "",               -- paste your Discord webhook URL here
    Username = "RCore Housing",  -- bot username shown in embeds
    Footer   = "rcore_housing",  -- embed footer text
}
```

| Option     | Description                                                             |
| ---------- | ----------------------------------------------------------------------- |
| `Webhook`  | Full Discord webhook URL (e.g. `https://discord.com/api/webhooks/...`). |
| `Username` | Display name for the webhook bot.                                       |
| `Footer`   | Small text rendered at the bottom of each embed.                        |

## ox\_lib Logger

When the `ox_lib` service is enabled, logs are forwarded through [ox\_lib's Logger module](https://overextended.dev/ox_lib/Modules/Logger/Server). ox\_lib itself supports multiple backends — the most common choice for FiveM servers is **Fivemanage**.

### Setting up Fivemanage with ox\_lib

1. Create an account at [fivemanage.com](https://fivemanage.com) and generate a **Log API token**.
2. Open your `server.cfg` and add:

```cfg
set ox:logger "fivemanage"
set fivemanage:key "YOUR_API_TOKEN_HERE"
```

3. Make sure `ox_lib` starts **before** `rcore_housing` in your `server.cfg`.
4. Set `Config.Logs.Service["ox_lib"] = true` in `config.logs.lua`.

All rcore\_housing log events will now appear in your Fivemanage dashboard under the log viewer.

{% hint style="info" %}
ox\_lib also supports Datadog and other providers. See the [ox\_lib Logger documentation](https://overextended.dev/ox_lib/Modules/Logger/Server) for the full list of supported backends and their setup instructions.
{% endhint %}

## Disabling Individual Log Events

Every hookable event can be excluded from **all** services by setting it to `true` in `DisableLogs`:

```lua
Config.Logs.DisableLogs = {
    OnPropertyCreate       = false,
    OnPropertyDelete       = false,
    OnPropertyEdit         = false,
    OnOwnerChange          = false,
    OnRenterChange         = false,
    OnPermissionUpdate     = false,
    OnPropertyReset        = false,
    OnOwnershipTransfer    = false,
    OnTenantAdd            = false,
    OnTenantRemove         = false,
    OnPlayerEntry          = false,
    OnPlayerExit           = false,
    OnKeyGranted           = false,
    OnKeyRevoked           = false,
    OnFurniturePlaced      = false,
    OnFurnitureRemoved     = false,
    OnFurnitureMoved       = false,
    OnAlarmEvent           = false,
    OnAlarmDismissed       = false,
    OnMarketplaceBuy       = false,
    OnInstantSell          = false,
    OnStashOpened          = false,
    OnStashItemAdded       = false,  -- ox_inventory only
    OnStashItemRemoved     = false,  -- ox_inventory only
}
```

Set any event to `true` to suppress its logs across all enabled services. For example, to stop logging every player entry and exit:

```lua
OnPlayerEntry = true,
OnPlayerExit  = true,
```

### Event Reference

| Event                 | Fires when…                                           |
| --------------------- | ----------------------------------------------------- |
| `OnPropertyCreate`    | A new property is created.                            |
| `OnPropertyDelete`    | A property is deleted.                                |
| `OnPropertyEdit`      | Property settings are edited.                         |
| `OnOwnerChange`       | The property owner changes.                           |
| `OnRenterChange`      | A renter is added or removed.                         |
| `OnPermissionUpdate`  | Access permissions are modified.                      |
| `OnPropertyReset`     | A property is reset to defaults.                      |
| `OnOwnershipTransfer` | Ownership is transferred between players.             |
| `OnTenantAdd`         | A tenant is added.                                    |
| `OnTenantRemove`      | A tenant is removed.                                  |
| `OnPlayerEntry`       | A player enters a property.                           |
| `OnPlayerExit`        | A player exits a property.                            |
| `OnKeyGranted`        | A key is given to a player.                           |
| `OnKeyRevoked`        | A key is revoked from a player.                       |
| `OnFurniturePlaced`   | Furniture is placed inside a property.                |
| `OnFurnitureRemoved`  | Furniture is removed.                                 |
| `OnFurnitureMoved`    | Furniture is repositioned.                            |
| `OnAlarmEvent`        | An alarm is triggered.                                |
| `OnAlarmDismissed`    | An alarm is dismissed.                                |
| `OnMarketplaceBuy`    | A property is purchased from the marketplace.         |
| `OnInstantSell`       | A property is instant-sold.                           |
| `OnStashOpened`       | A property stash is opened.                           |
| `OnStashItemAdded`    | An item is added to a stash (ox\_inventory only).     |
| `OnStashItemRemoved`  | An item is removed from a stash (ox\_inventory only). |
