From d4b06a048db5efd5a65cd9e1b730ccf765418a8c Mon Sep 17 00:00:00 2001 From: Andrew Thompson Date: Fri, 24 Jun 2011 13:33:39 -0400 Subject: [PATCH] Adventures in org mode --- README.org | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.org b/README.org index 024917e..7c419d1 100644 --- a/README.org +++ b/README.org @@ -18,21 +18,29 @@ some other way of including it in erlang's path. You can then add the following option to the erlang compiler flags +#+BEGIN_EXAMPLE {parse_transform, lager_transform} +#+END_EXAMPLE Alternately, you can add it to the module you which to compile with logging enabled: +#+BEGIN_EXAMPLE -compile([{parse_transform, lager_transform}]). +#+END_EXAMPLE Once you have built your code with lager, you can then generate log messages by doing the following: +#+BEGIN_EXAMPLE lager:error("Some message") +#+END_EXAMPLE Or: +#+BEGIN_EXAMPLE lager:warning("Some message with a term: ~p", [Term]) +#+END_EXAMPLE The general form is lager:Severity() where Severity is one of the log levels mentioned above.