[erlang-questions] application:get_env return undefined
Bengt Kleberg
bengt.kleberg@REDACTED
Wed Jan 9 14:45:39 CET 2013
Greetings,
Is this not the problem that the file app.config must have .config
extension on the file itself, but must not have .config extension on the
command line ("-config app")?
bengt
On Wed, 2013-01-09 at 19:13 +0600, Alexander 0xAX wrote:
> Hello,
>
>
>
> I have simple test application with test.app.src file, test_app.erl
> and test_sup.erl
>
>
> Also i want to read config in my application. I have app.config:
>
>
> [
> {my_app_config,
> [{key1, "val"}]}
> ].
>
>
> I run my application:
>
>
> erl -boot start_sasl -config app.config -s test_app
>
>
> And now, after application successful starting i try to read my
> config:
>
>
> >application:get_env(test_app, my_app_config).
> undefined
>
>
> Why? How can i correctly read config file?
>
>
> Thank you.
> _______________________________________________
> erlang-questions mailing list
> erlang-questions@REDACTED
> http://erlang.org/mailman/listinfo/erlang-questions
More information about the erlang-questions
mailing list