Permalink
Browse files

Document the lager_truncation_size compile-time option

  • Loading branch information...
1 parent 2f43aca commit bcbd8ff9399f2b4bbee537e527cebd2b7c1476a6 @Vagabond Vagabond committed Sep 26, 2012
Showing with 15 additions and 0 deletions.
  1. +15 −0 README.org
View
@@ -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

0 comments on commit bcbd8ff

Please sign in to comment.