[erlang-questions] Application environment

Serge Aleynikov serge@REDACTED
Wed May 27 22:39:31 CEST 2015


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


More information about the erlang-questions mailing list