Skip to content

Instantly share code, notes, and snippets.

@fjahr fjahr/debug.ex
Created Apr 24, 2018

Embed
What would you like to do?
Debugging Plug as a last resort for debugging nasty production issue in Elixir/Phoenix/AWS ECS Fargate
defmodule MyApp.Plugs.Debug do
@behaviour Plug
require Logger
def init(default), do: default
def call(conn, _) do
case conn.request_path do
"/path/to/error" ->
Logger.debug inspect(conn)
_ ->
nil
end
conn
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.