title: How One can keep track of failed records in Spring Batch?
body: <p>I want to keep track of records which was failed during the reading step of a job. I have used SkipListener for this.</p>
  
  <pre><code>public class SkipListener implements org.springframework.batch.core.SkipListener {
  
      public void onSkipInProcess(Object arg0, Throwable arg1) {
  
      }
  
      public void onSkipInRead(Throwable arg0) {
  
          System.out.println(arg0);
  
      }
  
      public void onSkipInWrite(Object arg0, Throwable arg1) {
  
  
      }
  
  }
  </code></pre>
  
  <p>I want to store the line skipped by reader in another csv file.
  From the above <code>onSkipInRead(Throwable arg0)</code> method i am getting throwable object like this : </p>
  
  <pre><code>org.springframework.batch.item.file.FlatFileParseException: Parsing error at line: 5 in resource=[class path resource [files/input2.csv]], input=[1005,anee,Active,500000,34,888]
  </code></pre>
  
  <p>I want only record as : <code>1005,anee,Active,500000,34,888</code>
  How can I get this or I have to parse manually the throwable object and get this?</p>
  
  <p>Second Question is that : I want to keep track of Number of items actually submitted to job, Number of item skipped, Number of item processed successfully, Is there any support provided by Spring Batch for this?</p>