[erlang-questions] application:get_env return undefined

Alexander 0xAX anotherworldofworld@REDACTED
Wed Jan 9 14:13:34 CET 2013


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


More information about the erlang-questions mailing list