logger_json v3.0.2 LoggerJSON.Plug
A Plug to log request information in JSON format.
Link to this section Summary
Functions
Initializes the Plug
Link to this section Functions
Link to this function
init(opts)
Initializes the Plug.
Available options
:level
- log level which is used to log requests;:version_header
- request header which is used to determine API version requested by client, default:x-api-version
;:metadata_formatter
- module withbuild_metadata/3
function that formats the metadata before it's sent to logger, default -LoggerJSON.Plug.MetadataFormatters.GoogleCloudLogger
.
Available metadata formatters
LoggerJSON.Plug.MetadataFormatters.GoogleCloudLogger
leverages GCP LogEntry format;LoggerJSON.Plug.MetadataFormatters.ELK
see module for logged structure.