Deprecate levelpad of Logger.Formatter by nallwhy ยท Pull Request #11633 ยท elixir-lang/elixir

Skip to content

Navigation Menu

Sign in

Appearance settings

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Conversation

@nallwhy

Copy link Copy Markdown

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
xxdavid reacted with confused emoji

@josevalim

Copy link Copy Markdown

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 reacted with heart emoji

@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 Copy Markdown

Member

๐Ÿ’š ๐Ÿ’™ ๐Ÿ’œ ๐Ÿ’› โค๏ธ

nallwhy reacted with heart emoji

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Fix alignment of info log

2 participants

@nallwhy @josevalim