I tried the following
def index(conn, _params) do
Logger.debug conn
......
But I get
protocol String.Chars not impleme
You can indeed use Kernel.inspect/2 to pretty-print the contents of the %Plug.Conn{} using:
def index(conn, _params) do
:logger.info inspect(conn, pretty: true)
....
end
Note that previous answers using Logger should mention that you need to require Logger before you use it, as in:
require Logger
def index(conn, _params) do
Logger.info inspect(conn, pretty: true)
....
end