Breeze.Logger.Collector (Breeze v0.4.0)

Copy Markdown View Source

Supervised storage and handler lifecycle for Breeze log capture.

A single Breeze server starts an ephemeral collector when log capture is enabled. Applications running multiple Breeze sessions can instead add this module before those sessions in their own supervision tree:

children = [
  Breeze.Logger.Collector,
  {Breeze.Server, view: MyApp.View, logger: :attach}
]

Use a :rest_for_one or :one_for_all strategy when the Breeze sessions should restart after their shared collector.

Summary

Functions

Returns a specification to start this module under a supervisor.

Starts the collector.

Functions

child_spec(init_arg)

Returns a specification to start this module under a supervisor.

See Supervisor.

start_link(opts \\ [])

Starts the collector.

Only one collector is supported per VM because Erlang logger handlers are VM-global.