[erlang-questions] R21 logger mangles map messages

Siri Hansen erlangsiri@REDACTED
Thu Aug 9 10:31:32 CEST 2018


It is probably the single_line property on the formatter that causes this.
If single_line is true (default), then the formatted string is converted to
a single line by replacing all newlines with ", " (comma, space). Could you
please try to set single_line to false and let me see the output? The
property can be set as follows (if the printout comes from the default
handler):

logger:update_formatter_config(default,single_line,false).

Regards
/siri

Den ons. 8. aug. 2018 kl. 23:01 skrev Mark Geib <mark.geib.44@REDACTED>:

> I am migrating an application to R21 to try out the new logger. When I log
> a message with a map, using “~p”, it appears like:
>
> #{pmt_pid =>, 33, program_number =>, 5837} <-----(notice the extra commas
> after each =>)
>
> compared to io:format output of #{pmt_pid => 33, program_number => 5837}
>
> In both cases my formatting is “~p”.
>
> Has anyone seen this before.??
>
> Thanks,
>
> Mark.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180809/1ad1bda1/attachment.htm>


More information about the erlang-questions mailing list