Logfmt.encode
You're seeing just the function
encode
, go back to Logfmt module for more information.
Specs
Encodes the given Dict into a Logfmt-style line.
Optionally a list of options can be given to change the encode behaviour.
Options
output
- if set to:iolist
, an iolist is returned, any other value will return a binary
Examples
iex> Logfmt.encode [foo: "bar"]
"foo=bar"
iex> Logfmt.encode %{"foo" => "bar"}
"foo=bar"
iex> Logfmt.encode [foo: "bar baz"]
"foo=\"bar baz\""
iex> Logfmt.encode [foo: "bar baz"], [output: :iolist]
[["foo", "=", ["\"", "bar baz", "\""]]]