Membrane.Log.Supervisor (Membrane Core v0.8.1) View Source

This module is deprecated. Use Elixir `Logger` instead.

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

Specs

child_id_t() :: term()

Link to this section Functions

Link to this function

add_logger(module, options, child_id)

View Source

Specs

add_logger(atom(), any(), child_id_t()) :: :ok | :invalid_module

Initializes logger and adds it to the supervision tree.

As arguments, 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.

Specs

each_logger(([children_info] -> any())) :: :ok
when children_info:
       {term() | :undefined, Supervisor.child() | :restarting,
        :worker | :supervisor, [module()] | :dynamic}

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

Should return :ok.

Specs

remove_logger(child_id_t()) :: atom()

Removes logger from the supervision tree

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

Link to this function

start_link(config, options \\ [])

View Source

Specs

start_link(Keyword.t(), [Supervisor.option()] | []) :: Supervisor.on_start()

Starts the Supervisor.

Options are passed to Supervisor.start_link/3.