# `ZenWebsocket.Debug`
[🔗](https://github.com/ZenHive/zen_websocket/blob/v0.4.2/lib/zen_websocket/debug.ex#L1)

Conditional debug logging for ZenWebsocket.

Provides debug logging that only outputs when `debug: true` is set in config.
This keeps library output quiet by default while allowing verbose logging
when troubleshooting connection issues.

# `log`

```elixir
@spec log(ZenWebsocket.Config.t(), String.t()) :: :ok
```

Log a debug message if debug mode is enabled in the config.

Always pass the Config struct directly - this is the canonical holder of the debug flag.

## Examples

    ZenWebsocket.Debug.log(config, "Connection established")
    ZenWebsocket.Debug.log(state.config, "Message received")

---

*Consult [api-reference.md](api-reference.md) for complete listing*
