<div dir="ltr">While this doesn't really fix the problem, if you are using emacs, it may help you ignore it ;)<div><br></div><div><div>(defun remove-dos-eol ()</div><div>  "Do not show ^M in files containing mixed UNIX and DOS line endings."</div>
<div>  (interactive)</div><div>  (setq buffer-display-table (make-display-table))</div><div>  (aset buffer-display-table ?\^M []))</div><div>(add-hook 'log-view-mode-hook 'remove-dos-eol)</div><div>(add-to-list 'auto-mode-alist '("\\.[0-9]+\\'" . log-view-mode))</div>
</div><div><br></div></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Tue, Mar 12, 2013 at 3:44 PM, Erik Søe Sørensen <span dir="ltr"><<a href="mailto:eriksoe@gmail.com" target="_blank">eriksoe@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><p dir="ltr">Hey now - why has Gmail begun eating my emails? I didn't even know it had happened before Tom wrote.</p>

<p dir="ltr">Anyway, I found the reason - it is the module 'standard_error' which is responsible, and it inserts the \r when a) you write to stderr and b) Erlang thinks it is connected to a terminal.</p>
<p dir="ltr">Hoping this helps, or at least illuminates. My original mail contained some demoing of when the conversion is active, but I won't try to write the command lines involved from this phone.</p>
<p dir="ltr">/Erik</p>
<div class="gmail_quote">Den 12/03/2013 21.51 skrev "Tom Burdick" <<a href="mailto:thomas.burdick@gmail.com" target="_blank">thomas.burdick@gmail.com</a>>:<div><div class="h5"><br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

<div dir="ltr">Erlang always seems to stuff carriage returns in its stdio output. Its really really annoying when using it with ports or... well anything.<div><br></div><div>I actually spent the time trying to hunt down where in the OTP those are being put in there so I could send a patch or keep a \r free version of erlang around for myself.</div>


<div><br></div><div>I gave up after an hour of trying to hunt it down, maybe someone more knowledgable can point us all in the right place?</div><div><br></div><div>Tom</div></div><div class="gmail_extra">
<br><br><div class="gmail_quote">On Mon, Mar 11, 2013 at 2:40 AM, Jay Doane <span dir="ltr"><<a href="mailto:jay@almery.com" target="_blank">jay@almery.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">I believe the erlang.log.N files come from <a href="http://www.erlang.org/doc/man/run_erl.html" target="_blank">http://www.erlang.org/doc/man/run_erl.html</a>, which is probably being invoked from the script rebar generated in rel/files.<div>



<br></div><div>There are several environment variables you can use to control the output, but I don't know how to get rid of those annoying carriage returns.  Sure wish I did...</div><span><font color="#888888"><div>


<br></div><div>
Jay</div></font></span></div><div><div><div class="gmail_extra"><br><br><div class="gmail_quote">On Sun, Mar 10, 2013 at 12:48 PM, Valentin Kuznetsov <span dir="ltr"><<a href="mailto:vkuznet@gmail.com" target="_blank">vkuznet@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 style="word-wrap:break-word">Hmm,<div>the application does use error_logger and the erlang.log.1 file contains proper lines from the logger, e.g.</div>



<div><br></div><div><div>=INFO REPORT==== 9-Mar-2013::20:55:05 ===^M</div><div><0.818.0> Listening on 10190.^M</div><div>Eshell V5.9.3  (abort with ^G)^M</div><div>(<a href="mailto:urlfetchd@127.0.0.1" target="_blank">urlfetchd@127.0.0.1</a>)1> ^M</div>



<div>=INFO REPORT==== 9-Mar-2013::20:55:31 ===^M</div><div><0.838.0> Client {127,0,0,1} connected.^M</div><div><br></div><div>The release log area has the following content:</div><div><br></div><div>erlang.log.1  run_erl.log  sasl  sasl-error.log</div>



<div><br></div><div>The sasl-error.log contains proper content too, e.g.</div><div><br></div><div><div>=SUPERVISOR REPORT==== 10-Mar-2013::18:29:44 ===</div><div>     Supervisor: {local,ssl_connection_sup}</div><div>     Context:    child_terminated</div>



<div>     Reason:     ekeyfile</div><div>     Offender:   [{pid,<0.1016.0>},</div><div>                  {name,undefined},                  {mfargs,{ssl_connection,start_link,undefined}},</div><div>                  {restart_type,temporary},</div>



<div>                  {shutdown,4000},                  {child_type,worker}]</div></div><div><br></div><div>but it does not have '\r' symbols.</div><div><br></div><div>The erlang.log.1 is not yet rotated since I only perform a few actions with my application.</div>



<div><div><div><br></div><div><div>On Mar 10, 2013, at ,Mar 10, 3:29 PM, Antoine Koener wrote:</div><br><blockquote type="cite">Erlang doesn't have a clue about <span></span>your .1 file.<div>See more about your log rotation program.</div>



<div>Also your log file doesn't look like a sasl or error logger file...</div><div><br></div><div><br><br>
On Sunday, March 10, 2013, Valentin Kuznetsov  wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi,<br>
I built OTP application using rebar build tool and when I'm running on UNIX systems (both OSX and Linux) I see that created erlang.log.1 file has dos '\r' carriage return symbols in every line. I look-up on a web and did not find any reference about such behavior. I'll appreciate any suggestions why this happens (I don't think it's related to my application per-se and rather feel that it's somehow introduced by rebar, but I'm not sure). The carriage return symbols appears right after logging started message and follow up ever line after that. Here is an example of the head of my log.<br>





<br>
=====<br>
===== LOGGING STARTED Sat Mar  9 20:55:02 EST 2013<br>
=====<br>
Exec: /Users/vk/Work/Languages/Erlang/urlfetch/rel/urlfetchd/erts-5.9.3/bin/erlexec -boot /Users/vk/Work/Languages/Erlang/urlfetch/rel/urlfetchd/releases/1/urlfetchd -mode embedded -config /Users/vk/Work/Languages/Erlang/urlfetch/rel/urlfetchd/etc/app.config -args_file /Users/vk/Work/Languages/Erlang/urlfetch/rel/urlfetchd/etc/vm.args -- console^M<br>





Root: /Users/vk/Work/Languages/Erlang/urlfetch/rel/urlfetchd^M<br>
Erlang R15B03 (erts-5.9.3) [source] [64-bit] [smp:2:2] [async-threads:5] [hipe] [kernel-poll:true]^M<br>
^M<br>
^M<br>
<br>
Thanks,<br>
Valentin.<br>
_______________________________________________<br>
erlang-questions mailing list<br>
<a>erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
</blockquote></div>
</blockquote></div><br></div></div></div></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
</div></div><br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>
<br>_______________________________________________<br>
erlang-questions mailing list<br>
<a href="mailto:erlang-questions@erlang.org" target="_blank">erlang-questions@erlang.org</a><br>
<a href="http://erlang.org/mailman/listinfo/erlang-questions" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div></div></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" target="_blank">http://erlang.org/mailman/listinfo/erlang-questions</a><br>
<br></blockquote></div><br></div>