How to pretty print conn content?

前端 未结 4 1515
天涯浪人
天涯浪人 2021-02-12 20:43

I tried the following

def index(conn, _params) do
    Logger.debug conn
     ......

But I get

protocol String.Chars not impleme         


        
4条回答
  •  刺人心
    刺人心 (楼主)
    2021-02-12 21:30

    You should be able to use Kernel.inspect/2 to pretty print conn:

    Logger.debug inspect(conn)
    

提交回复
热议问题