I have an OTP application. So far, I have two configuration files: rebar.config and config/vm.args, the latter of which is referenced in the former: {vm_args, "config/vm.args"}.
In the lager documentation: https://github.com/erlang-lager/lager
There is mention of another configuration file: app.config. Where does this file go and how do I reference it from my rebar config? In /src or at the root of the application? I ask because I tried adding that lager section in my rebar.config and that didn't do anything: lager is still operating with the defaults. So I probably need this app.config.
OK figured this out. In Rebar you can specify sys.config: https://www.rebar3.org/docs/releases
So I have a new file config/sys.config and my relx section now reads:
{relx, [
{release,
{myapp,"3.4.1"},
[myapp]
},
%{extend_start_script,true},
%
%for the following two fancyiness see https://www.rebar3.org/docs/releases
%Supply our own vm.args
{vm_args, "config/vm.args"},
%supply our own application configuration
{sys_config, "config/sys.config"}
]}.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With