我有一个基于 mochiweb 的应用程序。我在启动应用程序时指定了 -kernel error_logger '{file, "mylog.log"}',运行一段时间后,error_logger 不会输出任何内容。当应用程序启动时,
sys:get_status(EPID).
{status,<0.5.0>,
{module,gen_event},
[[{'$ancestors',[<0.2.0>]},
{'$initial_call',{gen_event,init_it,6}}],
running,<0.2.0>,[],
[{header,"Status for event handler error_logger"},
{data,[{"Status",running},{"Parent",<0.2.0>}]},
{items,{"Installed handlers",
[{handler,sasl_report_tty_h,false,all,false},
{handler,error_logger,false,[],false},
{handler,error_logger_file_h,false,
{<0.35.0>,"mylog.log",error_logger},
false}]}}]]}
而过了一段时间,
sys:get_status(EPID).
{status,<0.5.0>,
{module,gen_event},
[[{'$ancestors',[<0.2.0>]},
{'$initial_call',{gen_event,init_it,6}}],
running,<0.2.0>,[],
[{header,"Status for event handler error_logger"},
{data,[{"Status",running},{"Parent",<0.2.0>}]},
{items,{"Installed handlers",
[{handler,sasl_report_tty_h,false,all,false},
{handler,error_logger,false,[],false}]}}]]}
缺少 error_logger_file_h。为什么?