In <= v1.4.6, when you use Phoenix.Controller e.g. in the autogenerated my_app_web.ex file, you could set a :log option that would either set the log level for controller-related console output, or disable it altogether. In v1.4.7 to v1.4.9, this :log option is no longer respected even though the docs still say it should work as it previously did.
I'm guessing this has something to do with the move towards Elixir telemetry.
Environment
- Elixir version (elixir -v): 1.8.1
- Phoenix version (mix deps): 1.4.9
- NodeJS version (node -v): 8.9.3
- NPM version (npm -v): 6.10.1
- Operating system: Mac OSX 10.14.4
Expected behavior
When using Phoenix.Controller, (e.g. use Phoenix.Controller, namespace: MyAppWeb, log: false), the :log option should impact what output appears in the console.
Actual behavior
The :log option doesn't appear to have any effect, whether I set it to false or a log level atom like :info.
Repro steps
-
mix phx.new my_app (say yes to dependencies)
-
cd my_app
-
mix ecto.create
-
In lib/my_app_web.ex), set the :log option to false (or any other valid setting):
use Phoenix.Controller, namespace: MyAppWeb, log: false
-
mix phx.server
-
Load the homepage in a browser. In the console, you'll see the Phoenix.Controller log output in the debug level, even though the log: false setting should have disabled it.
In <= v1.4.6, when you
use Phoenix.Controllere.g. in the autogeneratedmy_app_web.exfile, you could set a:logoption that would either set the log level for controller-related console output, or disable it altogether. In v1.4.7 to v1.4.9, this:logoption is no longer respected even though the docs still say it should work as it previously did.I'm guessing this has something to do with the move towards Elixir telemetry.
Environment
Expected behavior
When
usingPhoenix.Controller, (e.g.use Phoenix.Controller, namespace: MyAppWeb, log: false), the:logoption should impact what output appears in the console.Actual behavior
The
:logoption doesn't appear to have any effect, whether I set it tofalseor a log level atom like:info.Repro steps
mix phx.new my_app(say yes to dependencies)cd my_appmix ecto.createIn
lib/my_app_web.ex), set the:logoption to false (or any other valid setting):mix phx.serverLoad the homepage in a browser. In the console, you'll see the Phoenix.Controller log output in the debug level, even though the
log: falsesetting should have disabled it.