Lets say I attach to a running Erlang application and I change the lager configuration from the console, by running:
lager:set_loglevel(lager_console_backend,"console.log", debug).
I then want to test it by issuing a command like:
lager:debug(<<"test">>).
But that won't work because Lager is implemented using parse tranformation at compile time.
Surely there must is a more verbose command which will work. Does such an instruction exist?
Solution, used the backwards compatable log API (without the parse transform).
([email protected])4> lager:log(error, "console", "foo"). ok
Verified it worked, using
tail -f
:tail -f ./dev1/logs/console.log 2014-07-29 17:12:21.255 [error] foo