Created
April 24, 2018 23:07
-
-
Save fjahr/a93fecc07667637172f87d3ab8a53d52 to your computer and use it in GitHub Desktop.
Debugging Plug as a last resort for debugging nasty production issue in Elixir/Phoenix/AWS ECS Fargate
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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