Issues with getting logs back in the terminal when using Phoenix after updating Elixir

Hi everyone,

I am having an issue with the app I am working on,

I updated my Elixir version to 1.17.1 from 1.14, and after the update I don’t receive any logs in my terminal when I have an error on a phoenix page that I am working on. This happens on all the pages and is a bit of an issue when it comes to bug fixes.

It is also worth noting that I am working on an old macbook.

Please can you assist, Thank you

Couple troubleshooting ideas:

  • Make sure you have your logger configured correctly. For example:
 iex(5)> Application.get_env(:logger, :console)
[
  format: "$time $metadata[$level] $message\n",
  metadata: [:request_id],
  level: :info
]
  • Recompile your application with mix compile --force.

  • Delete the _build directory in your project root directory, then restart the server (or run mix compile). That sometimes fixes little one-off issues.

1 Like

Thank you I will try this.

You might be affected by the changes to the Logger lib: elixir/CHANGELOG.md at v1.15 · elixir-lang/elixir · GitHub. You might need to replace your existing config with the new setup or even use LoggerBackends.Console — logger_backends v1.0.0 if you depend on the old implementation. It might not be obvious as there could be something in your dependencies that depends on it.

Thank you for this I do think that it may be a deps problem I am going to revert my elixir version back to version 1.15 and see if that will help.

Might not help, because this logger change was introduced in 1.15.

I see but if I revert back to 1.14 that should help? The system I am working on is working in version 1.14. I am not able to update the system itself because it is being used by a team so I think that reverting back could be a better option?

Most likely yes, because 1.14 is using the old logger-console arrangement.

Thanks again for the help I will try this.