View Source Zexbox.Logging (Zexbox v1.4.1)
Module for logging events in Zexbox.
Summary
Functions
Attaches Telemetry handlers for Phoenix controller events.
Functions
@spec attach_controller_logs!() :: :ok
Attaches Telemetry handlers for Phoenix controller events.
This function sets up handlers for the [:phoenix, :endpoint, :stop] and [:phoenix, :endpoint, :start] events.
The handlers are named "phoenix_controller_logs_stop" and "phoenix_controller_logs_start",
both of which use the LogHandler.handle_event/4 function to process the events.
Examples
iex> Logging.attach_controller_logs()
:ok
iex> Logging.attach_controller_logs()
** (RuntimeError) event already exists