# `Phantom.ClientLogger`
[🔗](https://github.com/dbernheisel/phantom_mcp/blob/main/lib/phantom/client_logger.ex#L1)

Notify the client of logs.

# `log_level`

```elixir
@type log_level() ::
  :emergency | :alert | :critical | :error | :warning | :notice | :info | :debug
```

# `alert`
*macro* 

Notify the client with a log at level "alert" with default domain "server".
Note: this requires the `session` variable to be within scope

# `alert`

```elixir
@spec alert(
  Phantom.Session.t(),
  structured_log :: map() | String.t(),
  domain :: String.t()
) :: :ok
```

Notify the client with a log at level "alert"

# `critical`
*macro* 

Notify the client with a log at level "critical" with default domain "server".
Note: this requires the `session` variable to be within scope

# `critical`

```elixir
@spec critical(
  Phantom.Session.t(),
  structured_log :: map() | String.t(),
  domain :: String.t()
) :: :ok
```

Notify the client with a log at level "critical"

# `debug`
*macro* 

Notify the client with a log at level "debug" with default domain "server".
Note: this requires the `session` variable to be within scope

# `debug`

```elixir
@spec debug(
  Phantom.Session.t(),
  structured_log :: map() | String.t(),
  domain :: String.t()
) :: :ok
```

Notify the client with a log at level "debug"

# `emergency`
*macro* 

Notify the client with a log at level "emergency" with default domain "server".
Note: this requires the `session` variable to be within scope

# `emergency`

```elixir
@spec emergency(
  Phantom.Session.t(),
  structured_log :: map() | String.t(),
  domain :: String.t()
) :: :ok
```

Notify the client with a log at level "emergency"

# `error`
*macro* 

Notify the client with a log at level "error" with default domain "server".
Note: this requires the `session` variable to be within scope

# `error`

```elixir
@spec error(
  Phantom.Session.t(),
  structured_log :: map() | String.t(),
  domain :: String.t()
) :: :ok
```

Notify the client with a log at level "error"

# `info`
*macro* 

Notify the client with a log at level "info" with default domain "server".
Note: this requires the `session` variable to be within scope

# `info`

```elixir
@spec info(
  Phantom.Session.t(),
  structured_log :: map() | String.t(),
  domain :: String.t()
) :: :ok
```

Notify the client with a log at level "info"

# `log`
*macro* 

Notify the client with a log at the provided level with the provided domain.

The log contents may be structured (eg, a map) or not. If not, it will be
wrapped into one: `%{message: your_string}`.

Note: this requires the `session` variable to be within scope

# `log`
*macro* 

Notify the client at the provided level for domain with the payload.

Note: this requires the `session` to be within scope.

# `log`

Notify the client for the provided session and domain at level with a payload

# `notice`
*macro* 

Notify the client with a log at level "notice" with default domain "server".
Note: this requires the `session` variable to be within scope

# `notice`

```elixir
@spec notice(
  Phantom.Session.t(),
  structured_log :: map() | String.t(),
  domain :: String.t()
) :: :ok
```

Notify the client with a log at level "notice"

# `warning`
*macro* 

Notify the client with a log at level "warning" with default domain "server".
Note: this requires the `session` variable to be within scope

# `warning`

```elixir
@spec warning(
  Phantom.Session.t(),
  structured_log :: map() | String.t(),
  domain :: String.t()
) :: :ok
```

Notify the client with a log at level "warning"

---

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