<div dir="ltr">I find that using make-pipe with copy-port works well. Often you need to create a thread that copies the data to the real port you want it to go to and then stdout (or whatever) and when you do that, you have to be careful to make sure ports get closed properly, or else you&#39;ll lose data, but it doesn&#39;t take much code and works well.<div>
<br></div><div>Robby</div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Thu, May 16, 2013 at 3:12 PM, Nick Shelley <span dir="ltr">&lt;<a href="mailto:nickmshelley@gmail.com" target="_blank">nickmshelley@gmail.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">I have a script that runs some automated tests and logs the results to the console. The tests can take 10+ minutes, so logging steps to the console is informative. I&#39;m using Racket to run the script with (system ...) and parse the logs and report pass/failure, but to do that I have to capture the logs. I spent about an hour in the port docs and can&#39;t figure out how to both log to the console and capture the logs in Racket for further processing (although I&#39;m really good at missing the obvious).<div>


<br></div><div>My current workaround is to use the tee command when running the script and then read in and process the file afterwords, but I was wondering if there is a more direct way to do this in Racket.</div>
</div>
<br>____________________<br>
  Racket Users list:<br>
  <a href="http://lists.racket-lang.org/users" target="_blank">http://lists.racket-lang.org/users</a><br>
<br></blockquote></div><br></div>