From bcbd8ff9399f2b4bbee537e527cebd2b7c1476a6 Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Wed, 26 Sep 2012 01:25:19 -0400 Subject: [PATCH] Document the lager_truncation_size compile-time option --- README.org | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.org b/README.org index 13656ae..f511d8a 100644 --- a/README.org +++ b/README.org @@ -236,3 +236,18 @@ #+BEGIN_EXAMPLE lager:trace_console([{pid, "<0.410.0>"}]) #+END_EXAMPLE + +* Setting the truncation limit at compile-time + Lager defaults to truncating messages at 4096 bytes, you can alter this by + using the {lager_truncation_size, X} option. In rebar, you can add it to + erl_opts: + +#+BEGIN_EXAMPLE + {erl_opts, [{parse_transform, lager_transform}, {lager_truncation_size, 1024}]}. +#+END_EXAMPLE + + You can also pass it to erlc, if you prefer: + +#+BEGIN_EXAMPLE + erlc -pa lager/ebin +'{parse_transform, lager_transform}' +'{lager_truncation_size, 64}' file.erl +l+END_EXAMPLE