Membrane Core v0.1.0 Membrane.Log.Supervisor View Source

Module responsible for supervising router_level loggers. It is also responsible for receiving and routing log messages to appropriate loggers.

It is spawned upon application boot.

Link to this section Summary

Functions

Initializes logger and adds it to the supervision tree

Returns a specification to start this module under a supervisor

Iterates through list of children and executes given function on every child

Removes logger from the supervision tree

Starts the Supervisor

Link to this section Types

Link to this type child_id_t() View Source
child_id_t() :: term()

Link to this section Functions

Link to this function add_logger(module, options, child_id) View Source
add_logger(atom(), any(), child_id_t()) :: :ok | :invalid_module

Initializes logger and adds it to the supervision tree.

As argumets, it expects module name, logger options and process/logger id

If successful returns :ok On error returns :invalid_module

Returns a specification to start this module under a supervisor.

See Supervisor.

Iterates through list of children and executes given function on every child.

Should return :ok.

Link to this function remove_logger(child_id) View Source
remove_logger(child_id_t()) :: atom()

Removes logger from the supervision tree

If succesful returns :ok If logger could not be found, returns corresponding error

Link to this function start_link(config, options \\ []) View Source

Starts the Supervisor.

Options are passed to Supervisor.start_link/3.