Erlang: Why can't I see error_logger: info_msg error when connecting remsh?

I am connecting to a running node with the -remsh flag, and I run my normal tests against the general test, but none of the error_logger: info_msg messages appear in the shell. Why?

+2


a source to share


1 answer


The default SASL event handler will only write events to the console / tty of the local node. When connecting via "-remsh" you start the second node and exchange the message goes to the first. The result from the "node ()" BIF can confirm this.

The calls to the error_logger functions will send events to the local 'error_logger' registered process, which is the gen_event server. You can manipulate it using error_logger: tty / 1 and error_logger: logfile / 1, see the reference documents under General, Application Group, then the application "kernel", then the module "error_logger".



You can also add your own event handler to the "error_logger" server, which can then do whatever you want with the event. I would suggest that error_logger: logfile / 1 might be sufficient for your purposes.

-Scott

+5


a source







All Articles