Fix bug in cth_log_redirect:terminate/2

Roberto Aloi <[email protected]>
Newsgroups gmane.comp.lang.erlang.patches
Message-ID <78097056.152332.1379322808632.JavaMail.zimbra@erlang-solutions.com>
Hi all,

The gen_event callback module expects terminate/2, not terminate/1.
Try to run a ct suite using ct:run_test/1 enabling tracing for error_logger and you should get something like:

(<0.1206.0>) call error_logger:delete_report_handler(cth_log_redirect)
(<0.1206.0>) returned from error_logger:delete_report_handler/1 -> {'EXIT',
                                                                    {undef,
                                                                     [{cth_log_redirect,
                                                                       terminate,
                                                                       [[],
                                                                        tc_log_async],
                                                                       []},
                                                                      {gen_event,
                                                                       do_terminate,
                                                                       7,
                                                                       [{file,
                                                                         "gen_event.erl"},
                                                                        {line,
                                                                         636}]},
                                                                      {gen_event,
                                                                       server_delete_handler,
                                                                       4,
                                                                       [{file,
                                                                         "gen_event.erl"},
                                                                        {line,
                                                                         431}]},
                                                                      {gen_event,
                                                                       handle_msg,
                                                                       5,
                                                                       [{file,
                                                                         "gen_event.erl"},
                                                                        {line,
                                                                         270}]},
                                                                      {proc_lib,
                                                                       init_p_do_apply,
                                                                       3,
                                                                       [{file,
                                                                         "proc_lib.erl"},
                                                                        {line,
                                                                         227}]}]}}

To fetch the patch:

git fetch git://github.com/robertoaloi/otp.git cth_fix_terminate

https://github.com/robertoaloi/otp/compare/erlang:maint...cth_fix_terminate
https://github.com/robertoaloi/otp/compare/erlang:maint...cth_fix_terminate.patch

Kind regards,

Roberto Aloi
---
Erlang Solutions Ltd.
www.erlang-solutions.com
_______________________________________________
erlang-patches mailing list
[email protected]
http://erlang.org/mailman/listinfo/erlang-patches
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.