View Source Baby.Util (Baby v0.16.1)

Utility functions for use across the codebase

Summary

Functions

Standardised connection activity logging for the supplied state dir: :in, :out, :both msg: a protocol message type atom level: log lvel atom (default: :debug)

Logging of fatal errors takes connection info and the error

Returns tuples of the endpoints of the widest continuous ranges in a list of integers

Functions

Link to this function

connection_log(conn_info, dir, msg, level \\ :debug)

View Source

Standardised connection activity logging for the supplied state dir: :in, :out, :both msg: a protocol message type atom level: log lvel atom (default: :debug)

Link to this function

log_fatal(conn_info, error)

View Source

Logging of fatal errors takes connection info and the error

Returns :error

Returns tuples of the endpoints of the widest continuous ranges in a list of integers