title: Logging in Spring batch
body: <p>I am new to spring batch. I want to know how we can put logging statement while implementing spring batch readers and writers. For example if I define readers and writers in spring context XML then later on I can't debug where my code failed.
  How can I achieve logging in Spring batch.
  Do I need to extend the available reader classes in java for example flatFileReader and put logging statement in java class.</p>
  
  <p>Or can I achieve this while maintaining my code in context file?</p>
  
  <p>And in case I want to throw my user defined exceptions then how can I do this.</p>