I would love to see a PR that implements translation for gen_statem, so we can evaluate if it makes sense to merge it into Elixir.
On Wed, Mar 27, 2024 at 4:10 PM Cameron Duley <cameron.dule...@gmail.com> wrote: > Several popular Elixir libraries use gen_statem internally, given it's > very useful for managing data over persistent connections. However Elixir's > default translations for Erlang log messages don't capture termination > reports from gen_statem. As a result, gen_statem terminations leave no > discernible errors for users. > > It's really difficult for users unfamiliar with gen_statem to identify > this issue, as they're unlikely to independently identify the problem and > resolution, without help from someone already aware of this behavior. > > The standing position is briefly discussed here > <https://elixirforum.com/t/why-does-logger-translator-ignore-gen-statem-reports/37418>, > but I think it's worth reconsidering. It wouldn't take too much additional > code to translate gen_statem exits, and it'd save lots of potential > headache. > > The current alternative solutions are to: > - Set "handle_sasl_reports: true" in logger's config (includes lots of > extraneous stuff). > - Copy/paste this translator > <https://github.com/Kraigie/nostrum/blob/v0.9.0-alpha1/lib/nostrum/state_machine_translator.ex> > from Nostrum, credit to Johannes Christ <https://github.com/jchristgit>. > > As an aside, this issue actually came up on TJ DeVries' Twitch stream > <https://clips.twitch.tv/SlickStylishBeaverDuDudu-nhlU6a-EIo3_cDa9>. > > -- > You received this message because you are subscribed to the Google Groups > "elixir-lang-core" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to elixir-lang-core+unsubscr...@googlegroups.com. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elixir-lang-core/5382811a-535d-40c6-a262-08f7e380b7a5n%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/5382811a-535d-40c6-a262-08f7e380b7a5n%40googlegroups.com?utm_medium=email&utm_source=footer> > . > -- You received this message because you are subscribed to the Google Groups "elixir-lang-core" group. To unsubscribe from this group and stop receiving emails from it, send an email to elixir-lang-core+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elixir-lang-core/CAGnRm4KybDd7cFv0H%3DsgVcxWi8FQ8DQco8EvZEv0j047U9TUEw%40mail.gmail.com.