Membrane Loggers v0.2.3 Membrane.Loggers.Console View Source

This module contains implementation of membrane logger that uses NIF calls to print messages to console.

Link to this section Summary

Functions

Callback invoked when new log message is received

Link to this section Functions

Link to this function

handle_log(level, msg, time, tags, state) View Source

Callback invoked when new log message is received.

Callback delivers 5 arguments:

  • atom containing log level
  • message - in IO list format
  • time
  • tags (list of atoms, e.g. module name)
  • internal logger state

On success, it returns {:ok, new_state}. it will just update logger's state to the new state.

If it returns {:error, reason, new_state} it indicates that something went wrong, and logger was unable to handle log. State will be updated to the new state.

Callback implementation for Membrane.Log.Logger.Base.handle_log/5.