Skip to content

Deprecate levelpad of Logger.Formatter - #11633

Merged
josevalim merged 4 commits into
elixir-lang:mainfrom
nallwhy:deprecate_levelpad
Feb 17, 2022
Merged

Deprecate levelpad of Logger.Formatter#11633
josevalim merged 4 commits into
elixir-lang:mainfrom
nallwhy:deprecate_levelpad

Conversation

@nallwhy

Copy link
Copy Markdown
Contributor

This PR fixes#11629.

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

@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:

defpcompile_code(key)whenkeyin@valid_patterns,do: key

Something like:

defpcompile_code(:levelpad)doIO.warn"$levelpad in Logger message format is deprecated, please remove it":levelpadend

@nallwhy
nallwhyforce-pushed the deprecate_levelpad branch 2 times, most recently from eac33c3 to b1d5a60CompareFebruary 16, 2022 23:56
@josevalim
josevalim merged commit f20c017 into elixir-lang:mainFeb 17, 2022
@josevalim

Copy link
Copy Markdown
Member

💚 💙 💜 💛 ❤️

Sign up for freeto 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

@nallwhy@josevalim