> ## Documentation Index
> Fetch the complete documentation index at: https://docs.almedia.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Logging

> How to integrate the Almedia SDK — synced from the source repository.

The SDK's runtime logging is **a no-op by default**. Runtime logs route through the static event `Almedia.OnLog`; when nothing is subscribed, they are discarded and nothing reaches the Unity Console. To see them, wire up the event explicitly:

```csharp theme={"theme":{"light":"github-light","dark":"night-owl"}}
Almedia.OnLog += (level, message) =>
{
    if (level == AlmediaLogLevel.Error) Debug.LogError(message);
    else if (level == AlmediaLogLevel.Warning) Debug.LogWarning(message);
    else Debug.Log(message);
};
```

`AlmediaLogLevel` values, in ascending severity: `Verbose`, `Debug`, `Info`, `Warning`, `Error`. Compare them with `==`, or order them with `<`, `<=`, `>` and `>=`.

The levels are chosen so that `Error` is safe to route into a crash reporter:

| Level | What it means |
| - | - |
| `Error` | Something worth a look: the backend rejected a request (4xx), a response could not be decoded, or work the game asked for (`Initialize`, linking, opening a screen) failed. |
| `Warning` | The SDK handled it. This includes ordinary connectivity loss - offline, DNS, timeouts, captive portals - in work the SDK runs on its own: notification polling, event delivery, status refreshes. One line per failed operation; the SDK retries by itself. |
| `Debug` | Individual retry attempts and request traces. |

Logs from the native plugins (iOS and Android) are forwarded into the same event by the bridge, so a single stream covers the entire runtime SDK. Route it into an existing pipeline (Sentry, custom analytics, etc.) by handling the event.

**Editor-only logs are an exception.** The settings bootstrap and the iOS post-build hook write directly to the Unity Console; they are design-time feedback and bypass `OnLog` entirely.

***


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.