[erlang-questions] Application environment

Serge Aleynikov <>
Wed May 27 23:37:40 CEST 2015


That's it! Thank you very much!

On Wed, May 27, 2015 at 4:49 PM, José Valim <
> wrote:

> 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 <>
> 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
>> 
>> http://erlang.org/mailman/listinfo/erlang-questions
>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20150527/d2930b46/attachment.html>


More information about the erlang-questions mailing list