[erlang-questions] Application environment
José Valim
jose.valim@REDACTED
Wed May 27 22:49:02 CEST 2015
You can call set_env with the [{persistent, true}] option.
More information about it in the docs:
http://www.erlang.org/doc/apps/kernel/application.html#set_env-3
*José Valim*
www.plataformatec.com.br
Skype: jv.ptec
Founder and Lead Developer
On Wed, May 27, 2015 at 10:39 PM, Serge Aleynikov <serge@REDACTED>
wrote:
> I run into an issue while trying to fix a test case in this pull request:
> https://github.com/erlang/otp/pull/713
>
> Is it possible to override application's startup environment dynamically
> if its *.app file contains an {env, [...]} clause?
>
> I had the following in the test case, in which my {file, File} setting
> would get discarded:
>
> SaslEnv = application:get_all_env(sasl),
> lists:foreach(fun({E,_V}) -> application:unset_env(sasl,E) end, SaslEnv),
>
> ok = application:set_env(sasl,sasl_error_logger,{file, File}),
> ok = application:start(sasl),
>
> Serge
>
>
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150527/9ce8e842/attachment.htm>
More information about the erlang-questions
mailing list