Lager issue

John Kemp john at
Thu Jan 10 13:11:18 EST 2013


I don't usually have issues with lager, but in logging for my application, I feel like I've done all the right things:

i) Put lager_transform in my rebar config:

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

ii) Lager is started when my app starts, and I know by asking at the console:

(lilith at> application:which_applications().
 {lager,"Erlang logging framework","0.9.4"},
 {crypto,"CRYPTO version 2","2.2"},
 {sasl,"SASL  CXC 138 11","2.2.1"},
 {stdlib,"ERTS  CXC 138 10","1.18.3"},
 {kernel,"ERTS  CXC 138 10","2.15.3"}]


(lilith at> application:start(lager).

And yet... 

(lilith at> lager:info("foo ~s", [bar]).     
** exception error: undefined function lager:info/2
(lilith at> lager:error("foo ~s", [bar]).
** exception error: undefined function lager:error/2
(lilith at> lager:warning("foo ~s", [bar]).
** exception error: undefined function lager:warning/2
(lilith at> lager:info("Hello!").                   
** exception error: undefined function lager:info/1

Can anyone tell me why lager continues to give me 'undef'?



More information about the riak-users mailing list