[erlang-questions] R21 logger mangles map messages
Siri Hansen
erlangsiri@REDACTED
Fri Aug 10 11:07:08 CEST 2018
Den tor. 9. aug. 2018 kl. 16:42 skrev Mark Geib <mark.geib.44@REDACTED>:
> Yes that removed the extra commas. Of course now the log messages are
> multi-line.
>
> So to get a single line message for maps, without the commas, is the only
> approach to format the message with something like
> io_lib:print(MyBigMap,1,8192,-1) and then log the string?
>
Yes, or you could specify field with 0 with ~p to indicate infinite line
length, e.g.
logger:notice("my map: ~0p",[MyMap])
(Using the value 0 here is new from OTP-21, see the description of control
sequence 'p' in the ref.man for io:format.)
I do, however, see this a bug in logger. It needs to be a bit more
sophisticated when ensuring single line - I'm looking into it.
Regards
/siri
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20180810/bc037b78/attachment.htm>
More information about the erlang-questions
mailing list