how to remove the print lines in bash into a log file when start a flask app?
<p>I start a flask application in bash like</p>

<blockquote>
  <p>python app.py &amp;</p>
</blockquote>

<p>But there is a lot of output informations in the bash when the application running, just as </p>

<blockquote>
  <p>Running on <a href="http://0.0.0.0:9999/" rel="nofollow">http://0.0.0.0:9999/</a> (Press CTRL+C to quit)
  "GET /hash/da9ba7b0369fa343f6cd5797cd9bcc49 HTTP/1.1" 200 -</p>
</blockquote>

<p>Is there any ways to remove these output informations into a log file?</p>

<p>Thanks! </p>

<p>You can capture both standard output &amp; error like this (and run in the background):</p>

<pre><code>(python app.py 2&amp;&gt;1 &gt;logfile.txt &amp;)
</code></pre>

<p>If you want to suppress output completely and drop the log:</p>

<pre><code>(python app.py 2&amp;&gt;1 &gt;/dev/null &amp;)
</code></pre>

<p>The parenthesis even suppress the job number <code>[1] 4456</code> displayed to show the background process id.</p>

python flask