Membrane Core v0.1.1 Membrane.Log.Router View Source

Defines a router that dispatches logs to instances of Membrane.Log.Logger.Base

Link to this section Summary

Functions

Returns a specification to start this module under a supervisor

Converts atom with level to its number representation

Sends asynchronous call to the router, requesting it to forward log message to appropriate loggers

Starts router as a separate process

Link to this section Functions

Returns a specification to start this module under a supervisor.

See Supervisor.

Link to this function level_to_val(atom) View Source
level_to_val(atom()) :: 0 | 1 | 2

Converts atom with level to its number representation

Valid atoms are:

  • :debug
  • :info
  • :warn
Link to this function send_log(level, message, time, tags \\ []) View Source
send_log(atom(), any(), String.t(), [atom()]) :: :ok

Sends asynchronous call to the router, requesting it to forward log message to appropriate loggers.

This functions assumes that passed log has level equal or greater than global level.

Link to this function start_link(config, process_options \\ []) View Source
start_link(any(), GenServer.options()) :: GenServer.on_start()

Starts router as a separate process.

Options are passed to Supervisor.start_link/3.