Browse Source

Adventures in org mode

pull/4/head
Andrew Thompson 14 years ago
parent
commit
d4b06a048d
1 changed files with 8 additions and 0 deletions
  1. +8
    -0
      README.org

+ 8
- 0
README.org View File

@ -18,21 +18,29 @@
some other way of including it in erlang's path. You can then add the some other way of including it in erlang's path. You can then add the
following option to the erlang compiler flags following option to the erlang compiler flags
#+BEGIN_EXAMPLE
{parse_transform, lager_transform} {parse_transform, lager_transform}
#+END_EXAMPLE
Alternately, you can add it to the module you which to compile with logging Alternately, you can add it to the module you which to compile with logging
enabled: enabled:
#+BEGIN_EXAMPLE
-compile([{parse_transform, lager_transform}]). -compile([{parse_transform, lager_transform}]).
#+END_EXAMPLE
Once you have built your code with lager, you can then generate log messages Once you have built your code with lager, you can then generate log messages
by doing the following: by doing the following:
#+BEGIN_EXAMPLE
lager:error("Some message") lager:error("Some message")
#+END_EXAMPLE
Or: Or:
#+BEGIN_EXAMPLE
lager:warning("Some message with a term: ~p", [Term]) 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 The general form is lager:Severity() where Severity is one of the log levels
mentioned above. mentioned above.

Loading…
Cancel
Save