Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do you set application variables for a rebar dependency?

I created a project using rebar called "mything". I added lager as a dependency. Now how do I configure lager? I tried adding a "lager" section to "env" in mything.app.src but it doesn't seem to get those settings. I guess I don't know where env settings for dependencies are supposed to go.

like image 591
Matt Avatar asked Oct 28 '25 15:10

Matt


1 Answers

You need to create config_name.config file which contains list of configurations for each appliaction you want to configure:

[{mything, [...]}, {lager, [...]}].

Then you can pass it to erl using option -config config_name. It's called system configuration and it overrides default environment properties from .app files. In releases it's usually named sys.config.

Resources for you: Configuring an Application and config.

like image 125
Łukasz Ptaszyński Avatar answered Oct 31 '25 10:10

Łukasz Ptaszyński



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!