[erlang-questions] Logger which truncates too big terms

Jachym Holecek freza@REDACTED
Fri Dec 2 16:38:59 CET 2011

# Max Lapshin 2011-12-02:
> No logger can reduce messages with current state of OTP.

Nor is it sensible logger's job to inspect or modify messages in any
way. Just send them to backing store with minimum hassle and make
best effort to minimize runtime impact on the caller. IMHO.

> https://github.com/erlyvideo/erlyvideo/blob/master/apps/erlyvideo/src/core/gen_server_ems.erl#L747
> this is where you need to move to protect your system from silly OOM
> while printing error message.

Yep, that's the right thing to do -- message originator is responsible
for what the message looks like. To a logger it's just a data blob
decorated with originator identity, or something else telling it
where that message belongs. IMHO.

	-- Jachym

More information about the erlang-questions mailing list