[erlang-questions] lager displaying module and function

Tim Watson watson.timothy@REDACTED
Fri Nov 4 21:37:02 CET 2011


My point wasn't that lager requires a parse_transform to work at all - it
will work fine without one. But I'm pretty sure that unless you've enabled
a parse_transform it will not include the ?MODULE and ?LINE information
magically (how would it!?) and looking at the tip of the github repo, the
lager.hrl include does not set a compile directive. Try putting this in
your rebar.config:

{erl_opts, [{parse_transform, lager_transform}]}.

On 4 November 2011 19:25, Joel Reymont <joelr1@REDACTED> wrote:

> I do see the output from lager, it just does not have the module and
> function in it.
>
> On Nov 4, 2011, at 7:24 PM, Tim Watson wrote:
>
> > i haven't actually used lager before, but perhaps there's a
> parse_transform you need to specify explicitly (in erl_opts or using a
> -compile directive). I can't imagine seeing that info magically otherwise.
> >
> > On 4 November 2011 18:31, Joel Reymont <joelr1@REDACTED> wrote:
> > How do I get lager to display the module and function?
> >
> > When I invoke lager:info(…) at the moment, I only see [info] and the
> message but no function and module.
> >
> >        Thanks, Joel
>
> --------------------------------------------------------------------------
> - for hire: mac osx device driver ninja, kernel extensions and usb drivers
> ---------------------+------------+---------------------------------------
> http://wagerlabs.com | @wagerlabs | http://www.linkedin.com/in/joelreymont
> ---------------------+------------+---------------------------------------
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20111104/6108fbfb/attachment.htm>


More information about the erlang-questions mailing list