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

Use Logger.warning to fix deprecation warnings #542

Merged
merged 2 commits into from
Dec 11, 2023

Conversation

janpieper
Copy link
Contributor

@janpieper janpieper commented Oct 26, 2023

When using commanded with Elixir 1.15, we currently see a lot deprecation warnings for Logger.warn/1:

warning: Logger.warn/1 is deprecated. Use Logger.warning/2 instead                                                                                                                                                   
  lib/commanded/middleware/consistency_guarantee.ex:47: Commanded.Middleware.ConsistencyGuarantee.after_dispatch/1

It should be fine to change Logger.warn/1 to Logger.warning/1 because the new function already exists since Elixir 1.11.

FYI: eventstore already has already been updated to use Logger.warning/1: commanded/eventstore#278


@slashdotdash What about this? 🔽

elixir: "~> 1.10",

and

Requires Erlang/OTP v21.0 and Elixir v1.9 or later.

Can we just increase these to at least 1.11? 🤔

@slashdotdash
Copy link
Member

@janpieper Let's bump the minimum Elixir version to v1.11

@janpieper
Copy link
Contributor Author

@slashdotdash Just pushed a new commit with increasing the minimum required elixir version to 1.11 😉

@janpieper
Copy link
Contributor Author

ping @slashdotdash 😉

@slashdotdash slashdotdash merged commit dcf48d9 into commanded:master Dec 11, 2023
2 checks passed
@janpieper janpieper deleted the fix-logger-warn-deprecation branch December 11, 2023 12:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants