3 ms·
Introducing Lager - A New Logging Framework for Erlang/OTP
- aphyr 15y agoParse transforms are an Erlang way of making puns at a higher level of abstraction. https://github.com/basho/lager/blob/master/src/lager_transform.erl#L95 https://github.com/basho/lager/blob/master/src/lager_transfo... 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});
- deleted 15y ago[deleted]