RuntimeError in Elixir 1.3.4: ":logger application not running"

I recently pushed a commit to Backtrex that makes logging more configurable for users, and it caused the Travis CI build to fail with the following error in Elixir 1.3.2 but not 1.4.0.

1) test Solver.solve/1 solve example Sudoku puzzle from Wikipedia article (Backtrex.Examples.Sudoku.Solver.Test)
 test/examples/sudoku/solver_test.exs:37
 ** (RuntimeError) cannot use Logger, the :logger application is not running
 stacktrace:
   (logger) lib/logger/config.ex:53: Logger.Config.__data__/0
   (logger) lib/logger.ex:363: Logger.level/0
   (backtrex) lib/backtrex.ex:93: Backtrex.solve/2
   test/examples/sudoku/solver_test.exs:40: (test)

Off hand do you know of differences between 1.3.2 and 1.4.0 that might cause this? If not I’ll probably try reinstalling 1.3.2 to get to the bottom of it locally.

The mix.exs file has :logger listed as an application.

I tried fixing it with a couple educated guesses, neither or which worked.

:extra_applications is 1.4 only and therefore ignored in 1.3. But I do not have a solution at hand, except for checking elixir/mix version during build and setting the application list in the format needed until 1.3 exceeds lifetime (for me this is when 1.5 gets released).

1 Like

Great, thanks for the pointer. I found that the expected keyword in 1.3 is :applications, and made this fix.

Using that fix makes 1.4 ignore the :extra_applications key and also disables application inference.