Disable Elixir Ecto Debug output

前端 未结 5 1053
别那么骄傲
别那么骄傲 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:10

    Simple put loggers: [] in

    config :my_app, MyApp.Repo, adapter: Ecto.Adapters.Postgres, database: "my_app_repo", username: "DB_USERNAME", password: "DB_PASSWORD", hostname: "DB_HOST", loggers: []

提交回复
热议问题