ex_json_logger v0.1.0 ExJsonLogger
A Logger formatter that converts logs to single line JSON.
Logging additional information
Use Logger’s metadata to add additional data to the log output.
This can be done through Logger.metadata/1
or by passing Keywords to standard Logger calls in the optional second parameter.
Logger filters metadata so any additional keys will need to be whitelisted in the backend’s configuration.
Usage
config :logger, :console,
format: {ExJsonLogger, :format},
metadata: [
:request_id,
:additional_key
]
Currently tested with the :console
logger backend.
Summary
Functions
Function referenced in the :format
config
Functions
format(level, msg, timestamp, metadata)
format(Logger.level, Logger.message, Logger.Formatter.time, Keyword.t) :: String.t
Function referenced in the :format
config.