Logbook.Formatters.Logfmt (logbook v4.0.0)
View SourceA logfmt formatter backend for the Elixir console logger backend, tailored to Logbook needs.
Ideally it should be used with the metadata: :all
option of the console
backend.
The log line is made of the following keys:
date
: date of the entry, in YYYY-MM-DD format.time
: time of the event, in hh:mm:ss.msec.level
: the log level.msg
: the actual log message.tag
: Logbook specific: comma separated list of logbook tags, fallbacks to`default` if the log entry has no tags.
module
: module emitting the log.function
: function emitting the log, in the form function/arity.vm_pid
: OS pid of the erlang vm.host
: hostname of the system, as returned from:inet.gethostname/0
.
Remainig metadata is appended to this list. Note that the :mfa
key is dropped
since module
and function
are already reported.
Summary
Functions
@spec format(atom(), IO.chardata(), Logger.Formatter.date_time_ms(), keyword()) :: IO.chardata()