Erlang: How to view output of io:format/2 calls in processes spawned on remote nodes.

Posted by jkndrkn on Stack Overflow See other posts from Stack Overflow or by jkndrkn
Published on 2010-04-06T18:07:43Z Indexed on 2010/04/06 19:23 UTC
Read the original article Hit count: 383

Filed under:
|
|
|
|

Hello,

I am working on a decentralized Erlang application. I am currently working on a single PC and creating multiple nodes by initializing erl with the -sname flag.

When I spawn a process using spawn/4 on its home node, I can see output generated by calls io:format/2 within that process in its home erl instance.

When I spawn a process remotely by using spawn/4 in combination with register_name, output of io:format/2 is sometimes redirected back to the erl instance where the remote spawn/4 call was made, and sometimes remains completely invisible.

Similarly, when I use rpc:call/4, output of io:format/2 calls is redirected back to the erl instance where the `rpc:call/4' call is made.

How do you get a process to emit debugging output back to its parent erl instance?

© Stack Overflow or respective owner

Related posts about erlang

Related posts about distributed