bash redirect output to file but result is incomplete
<p>The question of redirecting output of a command was already asked many times, however I am having a strange behavior. I am using a bash shell (debian) with version 
4.3.30(1)-release and tried to redirect output to a file, however not everything are logged in the file.
The bin file that I tries to run is sauce-connectv4.4.1 for linux (client of saucelabs that is publicly available in internet)</p>

<p>If I run </p>

<pre><code>#sudo ./bin/sc --doctor
</code></pre>

<p>it showed me a complete lines
<br>
it prints :</p>

<blockquote>
  <p>INFO: resolved to '23.42.27.27' 
  <br> INFO: resolving 'g2.symcb.com' using
  <br> DNS server '10.0.0.5'... 
  (followed by other line)
  <br>INFO: 'google.com' is not in hosts file
  <br>INFO: URL <a href="https://google.com" rel="nofollow noreferrer">https://google.com</a> can be reached</p>
</blockquote>

<p>However, if I redirect the same command to a file with the following command </p>

<pre><code>#sudo ./bin/sc --doctor &gt; alloutput.txt 2&gt;&amp;1
</code></pre>

<p>and do </p>

<pre><code>#cat alloutput.txt
</code></pre>

<p>the same command output is logged, but deprecated as following:</p>

<blockquote>
  <p>INFO: resolved to '23.42.2me@mymachine:/opt/$</p>
</blockquote>

<p>It has incomplete line, and the next lines that follows are not even logged (missing). </p>

<p>I have tried with >> for appending, it has the same problem. Using command &amp;> alloutput.txt also is not printing the whole stuff. Can anyone point out how to get all lines of the above command to be logged completely to the text file?</p>

<p><strong>UPDATE</strong></p>

<blockquote>
  <p>In the end I manage to use the native binary logging by using --log
  alloutput.txt where it completely provide me with the correct output.
  However I let this issue open as I am still wondering why one misses some information/lines by doing an output redirection</p>
</blockquote>