gpt4 book ai didi

erlang - 当您调用 io :format in common_test, 时,它会去哪里?

转载 作者:行者123 更新时间:2023-12-01 13:02:41 27 4
gpt4 key购买 nike

common_test 模块中的 io:format 调用不会到达用户控制台,但 error_log 消息会。我也不知道 io:format 调用去哪里了。在我的 repo 中对相关字符串运行 ack 没有任何结果。有谁知道他们去了哪里?

最佳答案

在您的规范中定义 {logdir, "logs"}. 然后 io:format 进入日志。这是通过 erlang:group_leader/2 设置 group_leader 来捕获测试的 IO 输出来完成的。

实际输出在该测试用例的日志输出中的相应测试用例下方。 logs/index.html 是您阅读的起点。

最后,它在 http://www.erlang.org/doc/apps/common_test/run_test_chapter.html 中有一些松散的记录第 6.9 节。

关于erlang - 当您调用 io :format in common_test, 时,它会去哪里?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/5009491/

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