
Introducing Lager - A New Logging Framework for Erlang/OTP - icey
http://blog.basho.com/2011/07/20/Introducing-Lager-A-New-Logging-Framework-for-ErlangOTP/
======
aphyr
Parse transforms are an Erlang way of making puns at a higher level of
abstraction.

[https://github.com/basho/lager/blob/master/src/lager_transfo...](https://github.com/basho/lager/blob/master/src/lager_transform.erl#L95)

transform_statement({call, Line, {remote, Line1, {atom, Line2, boston_lager},
{atom, Line3, Severity}}, Arguments}) -> NewArgs = case Arguments of [{string,
L, Msg}] -> [{string, L, re:replace(Msg, "r", "h", [{return, list},
global])}]; [{string, L, Format}, Args] -> [{string, L, re:replace(Format,
"r", "h", [{return, list}, global])}, Args]; Other -> Other end,
transform_statement({call, Line, {remote, Line1, {atom, Line2, lager}, {atom,
Line3, Severity}}, NewArgs});

