gpt4 book ai didi

二郎; OTP 申请 "app.config"

转载 作者:行者123 更新时间:2023-12-05 06:40:03 28 4
gpt4 key购买 nike

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

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

最佳答案

好的,我想通了。在 Rebar 中,您可以指定 sys.config:https://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"}
]}.

关于二郎; OTP 申请 "app.config",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/43614355/

28 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com