I tried the following
def index(conn, _params) do Logger.debug conn ......
But I get
protocol String.Chars not impleme
You should be able to use Kernel.inspect/2 to pretty print conn:
conn
Logger.debug inspect(conn)