Skip to content

Match Logger.Translator callback specs to dispatched messages - #16252

Merged
josevalim merged 1 commit into
elixir-lang:mainfrom
lukaszsamson:codex/logger-translator-spec
Nov 30, 2026
Merged

josevalim merged 1 commit into
elixir-lang:mainfrom
lukaszsamson:codex/logger-translator-spec

Conversation

@lukaszsamson

@lukaszsamson lukaszsamson commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

Give Logger.Translator.translate/4 a callback clause for each message kind. The dispatcher passes {format, args} for :format and {label, report} for :report. Elixir constructs the report tuple when it dispatches the OTP event. Elixir dispatcher

Specify IO.chardata() in both successful return forms so the callback contract covers Unicode charlists, as the translator documentation describes. OTP 27 already defines the three underlying log message forms: a format and argument list, a tagged report, and a tagged string containing Unicode chardata. OTP 27 logger:log_event/0

Assisted-by: Codex:GPT-6

@josevalim
josevalim merged commit 3b7779f into elixir-lang:main Nov 30, 2026
15 checks passed
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.

2 participants