LogHog.Integrations.Plug (log_hog v0.3.0)

View Source

Provides a plug that automatically extracts and sets relevant metadata from Plug.Conn.

For Phoenix apps, add it to your endpoint.ex somewhere before your router:

plug LogHog.Integrations.Plug

For Plug apps, add it directly into your Router:

defmodule MyRouterPlug do
  use Plug.Router

  plug LogHog.Integrations.Plug
  plug :match
  plug :dispatch

  ...
end