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.
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.