A PR for supporting keywords on the default handler is welcome. :) On Sat, Apr 29, 2023 at 00:43 Christopher Keele <christheke...@gmail.com> wrote:
> I can second that this has caught me off-guard before as well, and keyword > list support would be a welcome addition. > > > It can be confusing if folks then use the direct Erlang APIs. > > I think this could be circumvented for now by only describing the proposed > keyword list support in the boot configuration documentation ( > https://hexdocs.pm/logger/main/Logger.html#module-boot-configuration), > and being consistent elsewhere throughout documentation and project > scaffolds with whatever the Erlang API is. This suggests a series of > deprecation warnings between when Elixir adopts an OTP that supports maps > for logger configuration, and the last release in which support for OTP > releases that only use keyword lists is realized. > > On Friday, April 28, 2023 at 9:19:35 AM UTC-5 José Valim wrote: > >> I am wondering if we should allow keyword lists in those cases instead >> but it can be confusing if folks then use the direct Erlang APIs. >> >> On Fri, Apr 28, 2023 at 3:02 PM lostko...@gmail.com <lostko...@gmail.com> >> wrote: >> >>> Trying this again as my last 3 answers got deleted: >>> >>> For example here: >>> >>> config :logger, :default_handler, config: %{ >>> file: ~c"system.log", >>> filesync_repeat_interval: 5000, >>> file_check: 5000, >>> max_no_bytes: 10_000_000, >>> max_no_files: 5 >>> } >>> >>> ... as described in >>> https://hexdocs.pm/logger/main/Logger.html#module-boot-configuration >>> >>> Say I want to change the file path for different envs. >>> >>> >>> José Valim schrieb am Donnerstag, 30. März 2023 um 12:34:54 UTC+2: >>> >>>> Can you please provide examples of where this may happen? >>>> >>>> On Thu, Mar 30, 2023 at 12:08 PM lostko...@gmail.com < >>>> lostko...@gmail.com> wrote: >>>> >>>>> We'll be seeing deeper integration with :logger in the upcoming elixir >>>>> version, but :logger is using maps for configuration, which don't merge in >>>>> config, but require changing the whole map for any small change within the >>>>> map. Afaik maps are meant to become more common for configuration on >>>>> erlangs end, so are there any plans to bring the merging behaviour of >>>>> keyword lists to maps as well? >>>>> >>>>> -- >>>>> 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-co...@googlegroups.com. >>>>> To view this discussion on the web visit >>>>> https://groups.google.com/d/msgid/elixir-lang-core/754c06e5-62e2-48b1-a58b-7292afb34097n%40googlegroups.com >>>>> <https://groups.google.com/d/msgid/elixir-lang-core/754c06e5-62e2-48b1-a58b-7292afb34097n%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-co...@googlegroups.com. >>> >> To view this discussion on the web visit >>> https://groups.google.com/d/msgid/elixir-lang-core/6346ac29-28aa-4a6a-b4f1-6c7f9aabbc18n%40googlegroups.com >>> <https://groups.google.com/d/msgid/elixir-lang-core/6346ac29-28aa-4a6a-b4f1-6c7f9aabbc18n%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/b2235388-9911-48a5-8e60-12d9ae1c2babn%40googlegroups.com > <https://groups.google.com/d/msgid/elixir-lang-core/b2235388-9911-48a5-8e60-12d9ae1c2babn%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/CAGnRm4Kv1HRcB-hCtqX-_1H7n6MR9F%3DQC41yYSU-Om4OMdirtQ%40mail.gmail.com.