title: How to enable more detail in log for spring batch library
body: <p>Good day,</p>
  
  <p>I have a Spring batch, that using <code>org.springframework.batch.item.support.CompositeItemWriter</code> to write data into db.</p>
  
  <p>The following is the writer code in my xml:</p>
  
  <pre><code>    &lt;bean id="iReturnCompositeTableWriter" class="org.springframework.batch.item.support.CompositeItemWriter"&gt;
          &lt;property name="delegates"&gt;
              &lt;list&gt;
                  &lt;ref bean="iReturnTableWriter5" /&gt;
              &lt;/list&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
  &lt;bean id="iReturnTableWriter5" class="com.batch.job.writer.IReturnTableWriter"&gt;
      &lt;property name="assertUpdates" value="false" /&gt;
      &lt;property name="itemSqlParameterSourceProvider"&gt;
          &lt;!-- Our Mapper for table writer --&gt;
          &lt;bean class="com.batch.job.writer.mapper.IReturnWriterTableMapper" /&gt;
      &lt;/property&gt;
      &lt;!-- Put in your INSERT, UPDATE, DELETE SQL here --&gt;
      &lt;property name="sql"
          value="UPDATE ADM.TRX
      SET  STATUS = 'FAIL'
          WHERE INTERNALREFERENCENO = :theirTraceNum" /&gt;
      &lt;property name="dataSource" ref="dataSource" /&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>And the following is code of <code>IReturnTableWriter</code> class:</p>
  
  <pre><code>public class IReturnTableWriter extends JdbcBatchItemWriter&lt; TrxVO &gt;
          implements StepExecutionListener, ItemWriteListener&lt; TrxVO &gt; {
  
      public void afterWrite(List&lt;? extends BulkPaymentVO&gt; arg0) {
      }
  
      public void beforeWrite(List&lt;? extends BulkPaymentVO&gt; arg0) {
      }
  
      public void onWriteError(Exception arg0, List&lt;? extends BulkPaymentVO&gt; arg1) {
      }
  
      public ExitStatus afterStep(StepExecution arg0) {
      return null;
      }
  
      public void beforeStep(StepExecution arg0) {
      }
  }
  </code></pre>
  
  <p>And the following is the code of <code>IReturnWriterTableMapper</code> class:</p>
  
  <pre><code>public class IReturnWriterTableMapper implements
          ItemSqlParameterSourceProvider&lt; IbgReturnVO &gt; {
  
      public SqlParameterSource createSqlParameterSource(TrxVO trxVO) {
          return new BeanPropertySqlParameterSource(trxVO);
      }
  }
  </code></pre>
  
  <p>The batch log show this batch run successful without any error. The successful count is match with my input file row count. In the log, I also saw that its being read by the reader and store into <code>trxVO</code> object.</p>
  
  <p>However, there is 1 of the record did not updated to database in production, even the success count is correct. I grab the input file and run in SIT, UAT and its working fine. From the log, I cant see it log about the update query. </p>
  
  <p>I actually already enable log level to trace for <code>org.springframework.batch</code> and <code>org.springframework.jdbc</code> in logback.xml:</p>
  
  <pre><code>&lt;logger name="org.springframework.batch"&gt;
          &lt;level value="TRACE" /&gt;
      &lt;/logger&gt;
  
      &lt;logger name="org.springframework.jdbc"&gt;
          &lt;level value="TRACE" /&gt;
      &lt;/logger&gt;
  </code></pre>
  
  <p>And in log, I can saw its already take effect:</p>
  
  <pre><code>15:44:19,173 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - org.springframework.batch level set to TRACE
  15:44:19,173 |-INFO in ch.qos.logback.classic.joran.action.LevelAction - org.springframework.jdbc level set to TRACE
  </code></pre>
  
  <p>I would like to ask the way on how to enable more log for the writer, so that I can troubleshoot what is happening. </p>
  
  <p>Or, if you have more useful idea, or suggestion, please advise.</p>