I want to start lager before any eunit test is executed so that I can see the log when the tests are actually run (I use the log for debugging purposes).
However I have hundreds of tests (spread across multiple apps and modules) and I don’t want to go through every single one and put lager:start() at the beginning so I was wondering if there is a way to tell rebar (or eunit) to execute lager:start() before executing the eunit tests?
I think you can use erl params like “-s lager”, and pass it by method are described in following post.
passing runtime arguments to erlang when running rebar eunit