[erlang-questions] Integrating lager into our app

Martin Koroudjiev <>
Thu Jan 21 16:04:05 CET 2016


I am trying to include lager into our application but I am having
problems. I include the lager ebin directory on startup with: -pa
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:
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,

More information about the erlang-questions mailing list