basho/lager — pull request #100 by Vagabond (2012-12-05 05:09:36+00:00)
Title: Support pretty printing records found in a module at compile time

The lager parse transform now stores all record definitions found at compile time in the module's attributes and, using lager:pr/2, they can be prettyprinted as part of the log message:

```erlang
lager:info("My state is ~p", [lager:pr(State, ?MODULE)])
```

Needs more tests, but this is a proof of concept. Both records local to the module and records imported from a .hrl file are supported, so if the record is resolvable at compile time, it will be included in the module attributes.

@reiddraper @seancribbs