如何抑制来自 Erlang 交互式外壳的"PROGRESS REPORT"



我在macOS上使用Erlang/OTP 20。Eshell打印了多行标题为"进度报告"的行,我希望它不要打印。

逆CCD_ 1 ing和类似的变通方法是不可取的。

以下是打印的报表示例:

=进度报告====2017年8月28日:22:39:40===主管:{local,sasl_safe_sup}started:[{pid,<0.59.0>},{id,alarm_handler},{mfargs,{alarm_handler,start_link,[]}},{restart_type,永久},{shutdown,2000},{child_type,worker}]

=进度报告====2017年8月28日:22:39:40===主管:{local,sasl_sup}started:[{pid,<0.58.0>},{id,sasl_safe_sup},{mfargs,{supervisor,start_link,{local,sasl_safe_sup},sasl,safe]}},{restart_type,永久},{shutdown,infinity},{child_type,supervisor}]

=进度报告====2017年8月28日:22:39:40===主管:{local,sasl_sup}started:[{pid,<0.60.0>},{id,release_handler},{mfargs,{release_handler,start_link,[]}},{restart_type,永久},{shutdown,2000},{child_type,worker}]

sasl应用程序文档中所述,可以通过将配置参数errlog_type设置为error来抑制进度报告。

您可以在命令行上指定:

erl -sasl errlog_type error

或者,如果您使用的是sys.config文件,请将其添加到那里:

{sasl, [{errlog_type, error}]}

在节点启动后用application:set_env设置它是无效的:只有在sasl应用程序启动之前设置了该值,它才会生效。

如果你根本不想启动SASL应用程序,你可以使用不同的启动脚本:

erl -boot start_clean

这将完全禁用SASL消息。

最新更新