[erlang-questions] Integrating lager into our app

Martin Koroudjiev <>
Thu Jan 21 16:41:33 CET 2016


That made it work. Thank you very much!

Regards,
Martin

On 1/21/2016 5:12 PM, Roger Lipscombe wrote:
> You have to run the compiler with -pa ../lib/lager-2.0.3/ebin as well,
> so that it knows where to find the parse transform.
>
> On 21 January 2016 at 15:04, Martin Koroudjiev <> wrote:
>> Hello,
>>
>> I am trying to include lager into our application but I am having
>> problems. I include the lager ebin directory on startup with: -pa
>> "../lib/lager-2.0.3/ebin"
>> Then I start lager with: lager:start().
>> I define a constant as: -define(dbg(Fmt), lager:debug(Fmt)).
>> But when I try to use it in the code:
>> ?dbg("Hello").
>> it says: ** exception error: undefined function lager:debug/1
>>
>> I've checked lager's help page on github and saw that a parse_transform
>> must be set to lager_transform. Why is this needed?
>>
>> And how to actually do it? I compile my source files with erlc and pass
>> the transform option with +"{parse_transform, lager_transform}" but then
>> the code doesn't compile because lager_transform module is not present
>> at that time.
>>
>> Thank you,
>> Martin
>> _______________________________________________
>> erlang-questions mailing list
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions



More information about the erlang-questions mailing list