我试图在我的项目中使用lager_syslog,但似乎缺少了一个驱动程序。
这在我的rebar.conf里
{deps, [
...
{lager_syslog, {git, "https://github.com/basho/lager_syslog.git", {branch, master}}}
]}.我的测试处理器:
{lager_syslog_backend, ["test", local1, info]},错误:
19:29:09.981 [error] Lager failed to install handler {lager_syslog_backend,{"test",local1}} into lager_event, retrying later : {error,
{{shutdown,
{failed_to_start_child,
syslog,
"could not load driver syslog_drv: \"cannot open shared object file: No such file or directory\""}},
{syslog_app,
start,
[normal,
[]]}}}有什么建议吗?
发布于 2016-08-11 19:47:27
感谢肯尼斯拉金,他在邮件列表中回答了我的问题
rebar3将端口编译器移到rebar3插件上,而不是将其打包到核心项目中。据我所见,依赖它的rebar2项目将无法加载它们的端口驱动程序。
添加
{overrides,
[{override, syslog, [
{plugins, [pc]},
{artifacts, ["priv/syslog_drv.so"]},
{provider_hooks, [
{post,
[
{compile, {pc, compile}},
{clean, {pc, clean}}
]
}]
}
]}
]}.对项目中的rebar.conf进行清理和重建。( syslog项目是lager_syslog的端口驱动程序所在的位置。)
https://stackoverflow.com/questions/38702321
复制相似问题