logger_json v1.2.0 LoggerJSON.Formatter behaviour
Behaviour that should be implemented by log formatters.
Example implementation can be found in LoggerJSON.Formatters.GoogleCloudLogger
.
Link to this section Summary
Callbacks
Format event callback. Returned map will be encoded to JSON
Link to this section Callbacks
Link to this callback
format_event(level, msg, ts, md, state)
format_event( level :: Logger.level(), msg :: Logger.message(), ts :: Logger.Formatter.time(), md :: [atom()] | :all, state :: Map.t() ) :: Map.t()
Format event callback. Returned map will be encoded to JSON.