logrex v0.2.1 Logrex View Source
An Elixir package for more easily adding Logger metadata and formatting the console output so it’s easier for humans to parse.
It integrates with the Elixir Logger to let you write code like this:
use Logrex
name = "Matt"
user_info = %{login_count: 1}
Logrex.info "New login", [name, user_info.login_count, foo: "bar"]
To display this:
INFO 20:56:40 New login user=Matt login_count=1 foo=bar
Link to this section Summary
Functions
Custom Logger format function, which receives the Logger arguments and returns a string with formatted key/value metadata pairs broken out to the right of the message
Link to this section Functions
Custom Logger format function, which receives the Logger arguments and returns a string with formatted key/value metadata pairs broken out to the right of the message.