title: How to redirect Valgrind's output to a file?
body: <p>While working with Valgrind tool, i need to log the details produced by valgrind tool. How can I accomplish that? I tried something like,</p>
  
  <pre><code> valgrind a.out | test
  </code></pre>
  
  <p>and</p>
  
  <pre><code> valgrind a.out &gt; test
  </code></pre>
  
  <p>It gave just the program's output and not the valgrind memory error,leak information. Even i am getting like this if the program requires no user interaction (i.e. giving input). If the program need user input even that thing itself won't work. </p>
  
  <p>How can I do this?</p>