Disable Elixir Ecto Debug output

前端 未结 5 1055
别那么骄傲
别那么骄傲 2021-02-12 14:23

Whatever in iex> or using mix run -e \"My.code\" when I run the mix project using ecto, the Ecto\'s Debugging Mechanism display a bunch of SQLs like

5条回答
  •  既然无缘
    2021-02-12 15:22

    To disable debug messages temporarily you can do Logger.configure(level: :warn) and then re-enable with Logger.configure(level: :debug).

    https://hexdocs.pm/logger/Logger.html#Levels

提交回复
热议问题