PlugLoggerJson

Hex pmBuild StatusLicense

A comprehenisve JSON logger Plug.

Dependencies

Installation

If available in Hex, the package can be installed as:

  1. Add plug_logger_json to your list of dependencies in mix.exs:

    def deps do

     [{:plug_logger_json, "~> 0.4.0"}]

    end

  2. Ensure plug_logger_json is started before your application:

    def application do

     [applications: [:plug_logger_json]]

    end

  3. Replace Plug.Logger with Plug.LoggerJSON, log: Logger.level in your plug pipeline (endpoint.ex for phoenix apps)

Recommended Setup

Error Logging

Log Verbosity

Contributing

Before submitting your pull request, please run:

Please squash your pull request’s commits into a single commit with a message and detailed description explaining the commit.