2017-04-25 133 views
1

我有一個OTP應用程序。到目前爲止,我有兩個配置文件:rebar.configconfig/vm.args,後者在前者中引用:{vm_args, "config/vm.args"}Erlang; OTP應用程序「app.config」

在下面的文檔中:https://github.com/erlang-lager/lager 提到了另一個配置文件:app.config。這個文件在哪裏去,我如何從我的鋼筋配置中引用它?在/ src中還是在應用程序的根目錄下?我問,因爲我嘗試在我的rebar.config中添加lager部分,但這並沒有做任何事情:lager仍在使用默認值。所以我可能需要這個app.config

回答

1

好吧,明白了這一點。螺紋鋼,您可以指定sys.confighttps://www.rebar3.org/docs/releases

所以我有一個新的文件config/sys.config和我RELX部分現規定:

{relx, [ 
    {release, 
     {myapp,"3.4.1"}, 
     [myapp] 
    }, 
    %{extend_start_script,true}, 
    % 
    %for the following two fancyiness see https://www.rebar3.org/docs/releases 
    %Supply our own vm.args 
    {vm_args, "config/vm.args"}, 
    %supply our own application configuration 
    {sys_config, "config/sys.config"} 
    ]}. 
相關問題