Registry Helper v0.1.4 RegHelper View Source
Helps with Registry related tasks…
Link to this section Summary
Functions
Logs the initialization of a process (typically GenServer or Supervisor)
Logs the start of a process (typically GenServer or Supervisor)
Link to this section Functions
Link to this function
log_debug(pid \\ self(), tail)
View Source
log_debug(pid, String.t) :: :ok | {:error, term}
Link to this function
log_error(pid \\ self(), tail)
View Source
log_error(pid, String.t) :: :ok | {:error, term}
Link to this function
log_info(pid \\ self(), tail)
View Source
log_info(pid, String.t) :: :ok | {:error, term}
Logs the initialization of a process (typically GenServer or Supervisor).
Examples
use RegHelper
...
def init(_) do
log_init()
children = [...]
supervise children, strategy: :one_for_one
end
use RegHelper
...
def init(state) do
log_init()
{:ok, state}
end
Link to this function
log_start(on_start)
View Source
log_start(GenServer.on_start) :: GenServer.on_start
Logs the start of a process (typically GenServer or Supervisor).
Examples
use RegHelper
...
def start_link do
log_start Supervisor.start_link(__MODULE__, :ok, name: name())
end
use RegHelper
...
def start_link do
log_start GenServer.start_link(__MODULE__, :ok, name: name())
end
use RegHelper
...
def start_link(id) do
log_start GenServer.start_link(__MODULE__, id, name: via(id))
end
Link to this function
log_warn(pid \\ self(), tail)
View Source
log_warn(pid, String.t) :: :ok | {:error, term}