<div dir="ltr"><div><div><div>Hi Joe,<br></div>From your question, you might want to have a look at erld (<a href="https://github.com/ShoreTel-Inc/erld">https://github.com/ShoreTel-Inc/erld</a>). It provides a wrapper around Erlang which will capture the output of a "detached" Erlang node and log it. It also provides a bunch of other daemon-like behaviour (capturing signals for log rotation, startup return values etc). It doesn't currently allow for reattachment, but you can always --remsh into the node assuming it's named.<br><br></div>Cheers,<br><br></div>Bernard<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Feb 19, 2016 at 7:42 AM, Richard Carlsson <span dir="ltr"><<a href="mailto:carlsson.richard@gmail.com" target="_blank">carlsson.richard@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">(No idea why gmail decided to send my previous reply before I got a chance to actually type anything; please ignore that one.)<span class=""><br><br>2016-02-18 12:46 GMT+01:00 Joe Armstrong <span dir="ltr"><<a href="mailto:erlang@gmail.com" target="_blank">erlang@gmail.com</a>></span>:<br></span><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
<br>
 I start erlang with<br>
<br>
    $ erl -detached<br>
<br>
and have two questions:<br>
<br>
1) If program does io:format(Format, Data) where does the output go?<br></blockquote><div><br></div></span><div>/dev/null<br> </div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
Does the output just vanish, or do I have to unclog some buffers eventually?<br></blockquote><div> <br></div></span><div>It's gone.<br><br></div><span class=""><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
2) Can I attach to the process later?<br></blockquote><div><br></div></span><div>Yes, but only if you launch erl via the run_erl wrapper; see <a href="http://erlang.org/doc/man/run_erl.html" target="_blank">http://erlang.org/doc/man/run_erl.html</a><br> You can then attach to the running Beam later using to_erl (which seems to be still not documented...).<br></div><span class=""><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">
    And if so does this work on the three major platforms OS-X, linux and<br>
    windows?<br></blockquote><div> </div></span><div>The docs say "on Solaris" in the summary line, which is probably no 
longer the most popular platform for Erlang, but yes, it's for Linux too
 - and I would guess it works on BSD/OSX and similar, but you're probably 
supposed to use something completely different on Windows.<span class="HOEnZb"><font color="#888888"><br></font></span></div></div><span class="HOEnZb"><font color="#888888"><br></font></span></div><span class="HOEnZb"><font color="#888888"><div class="gmail_extra">     /Richard<br><br></div></font></span></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" rel="noreferrer" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>