I have an Elixir umbrella application. The applications under the umbrella use Logger. I want to add a backend (logger_logstash_backend) for
:logger application. So, I need to add that as a dependency in
deps function in mix file.
In the outermost mix file of the umbrella application, the documentation of
deps function states:
Dependencies listed here are available only for this project
and cannot be accessed from applications inside the apps folder
That means I have to add the backend module as a dependency for each of the applications under the umbrella. However, doing so causes several problems:
It becomes harder to move out the individual applications as separate libraries later.
The individual applications under the umbrella are not actually dependent on the custom
:loggerbackend module. They’re okay with default
:consolebackend. But I want to have an additional backend only for prod environment. Therefore, it’s more of a cross-applications concern where I’m forced to add the dependency to each application individually.
Do you know any better strategy? What is it?