Skip to content

Sinks

Sinks write formatted log messages somewhere. Every sink implements ILogSink:

public interface ILogSink
{
    void Send(LogLevel level, string formattedMessage, LogMessage logMessage);
}

All built-in sinks support a MinLevel property to drop messages below a severity threshold without requiring a filter object.

For remote/async sinks, extend CloudLogSink (which implements ICloudLogSink) — it provides per-sink filtering, fire-and-forget async dispatch, a pluggable formatter, and its own MinLevel property.

All sinks at a glance

Sink Type Description
UnityLogSink Local Writes to UnityEngine.Debug.Log/Warning/Error (added automatically)
FileLogSink Local Writes to a text file with auto-rotation
ConsoleLogSink Local Writes to System.Console (headless builds)
DiscordSink Remote POSTs to a Discord webhook
SlackSink Remote POSTs to a Slack webhook (Block Kit format)
LokiSink Remote Pushes to Grafana Loki
HttpSink Remote Generic HTTP POST/PUT to any endpoint
WebSocketSink Remote Sends over a WebSocket connection

Adding sinks

Via code

Log.Container.AddSink(new UnityLogSink());
Log.Container.AddSink(new DiscordSink("https://discord.com/api/webhooks/..."));

Via ScriptableObject

Create a LogixSettingsSO asset (Logix -> Global Settings), add EndpointSettingsSO or LokiSinkSettingsSO references to the config lists, then drag the asset onto the Editor Window toolbar. The settings take effect automatically.