# Overview

Source: https://coolify.io/docs/core/observability/log-drains/overview

Coolify log drains forward workload container output to an external logging destination. Configure one destination on a server, then enable log draining for the resources you want to include.

> **The short version**
>
> Enable Axiom, New Relic, or a custom Fluent Bit configuration on the server. Then turn on **Log drain** for each application, database, or service component and restart or redeploy it.

***

## What log drains forward

Coolify starts `coolify-log-drain` on the server. Opted-in resource containers send their `stdout` and `stderr` to this local Fluent Bit container, which forwards the records to your destination.

**Log drain scope**: Log drains cover opted-in workload containers, not every log available in Coolify.

**Forwarded**

- Application and Docker Compose application container output
- Standalone database container output
- Output from opted-in application and database components inside one-click services

**Not forwarded**

- Coolify deployment and build logs
- Coolify control-plane container logs
- Output from resources without Drain Logs enabled

***

## Choose a destination

- **[Axiom](https://coolify.io/docs/core/observability/log-drains/axiom)**: Send logs to an existing dataset using an Axiom API token.
- **[New Relic](https://coolify.io/docs/core/observability/log-drains/new-relic)**: Send logs to the regional New Relic Log API with an ingest license key.
- **[Custom Fluent Bit](https://coolify.io/docs/core/observability/log-drains/custom-fluent-bit)**: Provide a complete Fluent Bit configuration and optional parser definitions.

A server can have only one Coolify-managed log drain enabled at a time. Follow the destination guide for its credentials and configuration.

***

## Configure the server

1. Open **Servers** and select the validated server that runs the resources.
2. Open **Log Drains**.
3. Enter and save the settings for one destination while **Status** is **Disabled**.
4. Set **Status** to **Enabled** to start `coolify-log-drain`.

> **Info: Verify delivery in the logging provider**
>
> Coolify checks the required field formats but does not validate provider authentication or send a test event.

***

## Enable log draining for a resource

The server drain must be enabled first. Otherwise, Coolify turns the resource's **Log drain** setting off again.

> **Warning: Restart the resource after changing Drain Logs**
>
> Coolify applies the Docker logging driver when it creates the resource container. Restart or redeploy the resource after turning **Log drain** on or off.

**Application**

### Open the application

Open the application, then select **Advanced**. This also applies to Docker Compose applications.

### Enable Drain Logs

Under **Logs**, set **Log drain** to **Send logs to the log drain endpoint**.

### Apply the change

Restart or redeploy the application.

**Standalone database**

### Open the database

Open the standalone database, then select **General**.

### Enable Drain Logs

Under **Log delivery**, set **Log drain** to **Forward logs to the server drain**.

### Apply the change

Restart the database.

**Service component**

### Open the component

Open the application or database component inside the one-click service and find **Advanced**.

### Enable Drain Logs

Set **Log drain** to **Send logs to drain**.

### Apply the change

Restart or redeploy the service.

***

## Verify delivery

1. Make the resource write a recognizable message to `stdout` or `stderr`.
2. Open the logging provider and search recent events for that message.
3. If the event is missing, inspect the log-drain container on the resource server:

```sh
docker ps --filter name=coolify-log-drain
docker logs --tail 100 coolify-log-drain
```

The built-in Axiom and New Relic destinations flush every five seconds. A custom configuration uses its own **Flush** value.

***

## Limitations

* A server can use only one Coolify-managed log drain at a time.
* Retention, queries, dashboards, and log-based alerts are managed by the external provider.
* Disabling the server drain stops forwarding but does not clear the saved **Log drain** settings on resources.
