erlang-lager / lager

A logging framework for Erlang/OTP
Apache License 2.0
1.12k stars 456 forks source link

how to display complete system error message #538

Open luobin998877 opened 3 years ago

luobin998877 commented 3 years ago
Screen Shot 2021-02-06 at 11 41 14 PM

have set {lager_truncation_size, 409600} but nothing changed

jadeallenx commented 3 years ago

Unfortunately, it is a known issue that lager_truncation_size does not universally apply to all messages - for example, the value is hardcoded in https://github.com/erlang-lager/lager/blob/master/src/error_logger_lager_h.erl#L592 - you have two options here.

  1. You can increase the hard coded limit in https://github.com/erlang-lager/lager/blob/master/include/lager.hrl#L18, or
  2. You can patch lager such that the error logger handler respects lager_truncation_size

In either case you're going to have to recompile the patched lager and incorporate it into your application. Sorry.

(see also https://github.com/erlang-lager/lager/issues/211)