Phantom.ClientLogger (phantom_mcp v0.3.2)

View Source

Notify the client of logs.

Summary

Functions

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

Notify the client with a log at level "alert"

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

Notify the client with a log at level "critical"

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

Notify the client with a log at level "debug"

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

Notify the client with a log at level "emergency"

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

Notify the client with a log at level "error"

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

Notify the client with a log at level "info"

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

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

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

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

Notify the client with a log at level "notice"

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

Notify the client with a log at level "warning"

Types

log_level()

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

Functions

alert(payload, domain \\ "server")

(macro)
@spec alert(structured_log :: map(), domain :: String.t()) :: :ok

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

alert(session, payload, domain)

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

Notify the client with a log at level "alert"

critical(payload, domain \\ "server")

(macro)
@spec critical(structured_log :: map(), domain :: String.t()) :: :ok

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

critical(session, payload, domain)

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

Notify the client with a log at level "critical"

debug(payload, domain \\ "server")

(macro)
@spec debug(structured_log :: map(), domain :: String.t()) :: :ok

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

debug(session, payload, domain)

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

Notify the client with a log at level "debug"

emergency(payload, domain \\ "server")

(macro)
@spec emergency(structured_log :: map(), domain :: String.t()) :: :ok

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

emergency(session, payload, domain)

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

Notify the client with a log at level "emergency"

error(payload, domain \\ "server")

(macro)
@spec error(structured_log :: map(), domain :: String.t()) :: :ok

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

error(session, payload, domain)

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

Notify the client with a log at level "error"

info(payload, domain \\ "server")

(macro)
@spec info(structured_log :: map(), domain :: String.t()) :: :ok

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

info(session, payload, domain)

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

Notify the client with a log at level "info"

log(log_level, payload)

(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(log_level, payload, domain)

(macro)

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

Note: this requires the session to be within scope.

log(session, level_name, payload, domain)

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

notice(payload, domain \\ "server")

(macro)
@spec notice(structured_log :: map(), domain :: String.t()) :: :ok

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

notice(session, payload, domain)

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

Notify the client with a log at level "notice"

warning(payload, domain \\ "server")

(macro)
@spec warning(structured_log :: map(), domain :: String.t()) :: :ok

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

warning(session, payload, domain)

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

Notify the client with a log at level "warning"