[erlang-questions] lager/io:format and sets

Oleg Tsarev <>
Tue Nov 11 01:02:31 CET 2014


I am logging some record with set.
    State = #state{client_id  = ClientId,
                   session_id = SessionId,
                   user_id    = UserId,
                   channel_id_set = sets:new(),
                   mailbox = []},
    lager:debug("args ~p state ~p", [Args, lager:pr(State, ?MODULE)]),

As result I received:

**** User 2014-11-11 02:54:02.166 ****
02:54:02.166  debug qlp_client:init:89 args {0,"sid0",0} state

Same with io:format
10> io:format("test ~p", [sets:new()]).
test {set,0,16,16,8,80,48,

How I can fix the output of the set in lager and io:format?

Thank you very much,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20141111/bcbadcc0/attachment.html>

More information about the erlang-questions mailing list