Skip to content

Conversation

@nallwhy
Copy link
Contributor

@nallwhy nallwhy commented Feb 16, 2022

This PR fixes #11629.

  • $levelpad is removed from @default_pattern of Logger.Formatter
  • Functions related to levelpad are annotated with @deprecated

@josevalim
Copy link
Member

Thank you for the PR @nallwhy!

Unfortunately the @deprecated attributes you added won't work as expected. You need to remove them. Instead, you need to add something here:

defp compile_code(key) when key in @valid_patterns, do: key

Something like:

  defp compile_code(:levelpad) do
    IO.warn "$levelpad in Logger message format is deprecated, please remove it"
    :levelpad
  end

@nallwhy nallwhy force-pushed the deprecate_levelpad branch 2 times, most recently from eac33c3 to b1d5a60 Compare February 16, 2022 23:56
@josevalim josevalim merged commit f20c017 into elixir-lang:main Feb 17, 2022
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

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

Labels

None yet

Development

Successfully merging this pull request may close these issues.

Fix alignment of info log

2 participants