Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elixir v1.15 new app changes #5276

Open
josevalim opened this issue Feb 15, 2023 · 7 comments
Open

Elixir v1.15 new app changes #5276

josevalim opened this issue Feb 15, 2023 · 7 comments

Comments

@josevalim
Copy link
Member

Once phx_new is ready to depend on Elixir v1.15+, we should change config :logger, :console to config :logger, :default_formatter in the generated config files.

@yordis
Copy link

yordis commented Feb 16, 2023

@josevalim which file would that be at?

@michallepicki
Copy link
Contributor

michallepicki commented Feb 17, 2023

@yordis Files:

@yordis
Copy link

yordis commented Feb 17, 2023

Found the reference in terms of how it suppose to be!

config :logger, :default_formatter,
  format: "[$level] $message $metadata\n",
  metadata: [:error_code, :file]

Thank you, @michallepicki. I needed clarification!

@epinault
Copy link

epinault commented Nov 8, 2023

would this explain why upgrading to 1.15, I am starting to see 404 route errors

Ranch listener AppWeb.Endpoint.HTTP, connection process #PID<0.51084.0>, stream 3 had its request process #PID<0.51807.0> exit with reason {{%Phoenix.Router.NoRouteError{plug_status: 404,

those never showed until we moved to elixir 1.15 and OTP 26. Also using Phx 1.6 (trying to upgrade to 1.7 but not as trivial this time)

@epinault
Copy link

epinault commented Nov 8, 2023

also it seems that we need more than that.

config :logger, :default_handler,
  level: :info

need to be set as the level is only set from the handler per

All previous console configuration, except for :level, now go under :default_formatter.

@josevalim
Copy link
Member Author

You can still set config :logger, level: .... There is a global and a per-handler configuration.

@epinault
Copy link

epinault commented Nov 8, 2023

yes I see that it s not solving my issue . something in the upgrade is causing the logger to show raised error still , I filed #5628 to track it separately at this point.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants