View Source LogfmtEx.Encoder (logfmt_ex v0.4.2)
Encodes key=value pairs in logfmt.
Quotes values containing spaces and =
. For example,
Logger.info("I am a message with spaces", string: "key=value")
will be encoded as
message="I am a message with spaces" string="key=value"
Escapes newlines, line breaks, backslashes, and carriage returns.
Link to this section Summary
Link to this section Types
Metadata keys are atoms. Message, timestamp, and level keys are strings.
Link to this section Functions
Encodes the given key and value into a key=value pair.
Returns iodata/0
, an efficient data type for creating large binaries from small chunks.
A subset of keys from standard Elixir metadata are handled in special ways:
:domain
- encoded usinginspect/1
:mfa
- formatted usingException.format_mfa/3
options
Options:
:delimiter
- defaults to =