首页 文章

二郎神; OTP应用程序“app.config”

提问于
浏览
2

我有一个OTP应用程序 . 到目前为止,我有两个配置文件: rebar.configconfig/vm.args ,后者在前者引用: {vm_args, "config/vm.args"} .

在更大的文档中:https://github.com/erlang-lager/lager提到了另一个配置文件: app.config . 这个文件在哪里,我如何从我的rebar配置中引用它?在/ src或应用程序的根目录?我问,因为我尝试在我的 rebar.config 中添加 lager 部分并且没有做任何事情:lager仍然使用默认值运行 . 所以我可能需要这个 app.config .

1 回答

  • 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"}
       ]}.
    

相关问题