Permalink
Browse files

added "node" to metadata in parse transform

  • Loading branch information...
1 parent 0b797bc commit 84034aa512124c5f2c4371127e707c1f34357294 @tholschuh tholschuh committed Oct 5, 2012
Showing with 5 additions and 2 deletions.
  1. +1 −1 README.org
  2. +4 −1 src/lager_transform.erl
View
@@ -95,7 +95,7 @@
as configuration. Any iolist allowed elements in the configuration are printed verbatim. Atoms in the configuration
are treated as metadata properties and extracted from the log message.
The metadata properties date,time, message, and severity will always exist.
- The properties pid, file, line, module, and function will always exist if the parser transform is used.
+ The properties pid, file, line, module, function, and node will always exist if the parser transform is used.
#+BEGIN_EXAMPLE
["Foo"] -> "Foo", regardless of message content.
@@ -74,7 +74,10 @@ transform_statement({call, Line, {remote, _Line1, {atom, _Line2, lager},
{atom, Line, pid},
{call, Line, {atom, Line, pid_to_list}, [
{call, Line, {atom, Line ,self}, []}]}]},
- {nil, Line}}}}},
+ {cons, Line, {tuple, Line, [
+ {atom, Line, node},
+ {call, Line, {atom, Line, node}, []}]},
+ {nil, Line}}}}}},
{Traces, Message, Arguments} = case Arguments0 of
[Format] ->
{DefaultAttrs, Format, {atom, Line, none}};

0 comments on commit 84034aa

Please sign in to comment.