title: Output of Java code is not getting in WSO2 logs
body: <p>I am unable to see the output of the below java code in WSO2 logs.</p>
  
  <pre><code>    package com.esb.integration.mediators;
  
  import java.text.SimpleDateFormat;
  import java.util.Date;
  import java.sql.Connection;
  import java.sql.DriverManager;
  import java.sql.ResultSet;
  import java.sql.ResultSetMetaData;
  import java.sql.Statement;
  
  import org.apache.axiom.om.OMAbstractFactory;
  import org.apache.axiom.om.OMElement;
  import org.apache.axiom.om.OMFactory;
  import org.apache.axiom.om.OMNamespace;
  import org.apache.axiom.om.OMText;
  
  import org.apache.synapse.MessageContext;
  import org.apache.synapse.mediators.AbstractMediator;
  
  public class DbLookup extends AbstractMediator {
  
      private String url;
      private String userName;
      private String password;
      private String database;
      private String status;
      private String action;
      private String DSP;
      private String USER;
      private String PID;
      private String PMJ;
      private String PMT;
      private String NZPO;
      private String PD;
      private String SD;
      public  boolean mediate(MessageContext context) {
  
          String url = (String) context.getProperty("url");
          String userName = (String) context.getProperty("userName");
          String password = (String) context.getProperty("password");
          String database = (String) context.getProperty("database");
          String status = (String) context.getProperty("status");
          String action = (String) context.getProperty("action");
  
          try {
              System.out.println("Inside DB Extractor");
              System.out.println("Action: "+action);
              Class.forName("com.access.JDBCDriver");
  
              Connection conn = DriverManager.getConnection(url,userName,password);
              Statement stmt = conn.createStatement();
              System.out.println("After getting connection");
  
               if (action.equals("updateData")){
                  System.out.println("Inside  if: "+action);
                  int result =0;
                  DSP = (String) context.getProperty("DSP");
                  USER = (String) context.getProperty("USER");
                  PID = (String) context.getProperty("PID");
                  PMJ = (String) context.getProperty("PMJ");
                  PMT = (String) context.getProperty("PMT");
                  NZPO = (String) context.getProperty("NZPO");
                  PD = (String) context.getProperty("PD");
                  SD = (String) context.getProperty("SD");
  
                  String updateQuery = "Update Table Set DSP = '"+DSP+"',USER = '"+USER+"',PID = '"+PID+"',PMJ="+PMJ+",PMT="+PMT+" Where DSP&lt;&gt;'Y' AND NZPO='"+NZPO+"' AND PD='"+PD+"' AND SD="+SD;
                  System.out.println("Query String: "+updateQuery);
                  result = stmt.executeUpdate(updateQuery);
                  if(result&gt;0){
                      String response = "successfully updated "+result+" rows";
                      System.out.println("successfully added "+result);
                      context.setProperty("status",response);
                      return true;
                  }
  
                  else{
                      System.out.println("failed");
                      context.setProperty("status","0 rows were updated");
                      return true;
                  }
  
              }
              else {
                  context.setProperty("status","Failed");
                  return false;
              }
          }catch (Exception e) {
              System.out.println("Got an exception! ");
              System.out.println(e.getMessage());
              context.setProperty("status","Failed");
              return false;
          }
      }
  
      public String getUrl() {
          return url;
      }
  
      public void setUrl(String url) {
          this.url = url;
      }
      public String getUserName() {
          return userName;
      }
  
      public void setUserName(String userName) {
          this.userName = userName;
      }
      public String getPassword() {
          return password;
      }
  
      public void setPassword(String password) {
          this.password = password;
      }
      public String getDatabase() {
          return database;
      }
  
      public void setDatabase(String database) {
          this.database = database;
      }
      public String getstatus() {
          return status;
      }
  
      public void setstatus(String status) {
          this.status = status;
      }
  
      public String getAction() {
          return action;
      }
  
      public void setAction(String action) {
          this.action = action;
      }
  
  
      public String getDSP() {
          return DSP;
      }
      public void setDSP(String DSP) {
          DSP = DSP;
      }
      public String getUSER() {
          return USER;
      }
      public void setUSER(String USER) {
          USER = USER;
      }
      public String getPID() {
          return PID;
      }
      public void setPID(String PID) {
          PID = PID;
      }
      public String getPMJ() {
          return PMJ;
      }
      public void setPMJ(String PMJ) {
          PMJ = PMJ;
      }
      public String getPMT() {
          return PMT;
      }
      public void setPMT(String PMT) {
          PMT = PMT;
      }
      public String getNZPO() {
          return NZPO;
      }
      public void setNZPO(String NZPO) {
          NZPO = NZPO;
      }
      public String getPD() {
          return PD;
      }
      public void setPD(String PD) {
          PD = PD;
      }
      public String getSD() {
          return SD;
      }
      public void setSD(String SD) {
          SD = SD;
      }
  }
  </code></pre>
  
  <p>Here is the proxy service:-</p>
  
  <pre><code>&lt;proxy xmlns="http://ws.apache.org/ns/synapse" name="TestProxy" transports="jms" statistics="disable" trace="disable" startOnLoad="true"&gt;
         &lt;inSequence&gt;
         &lt;property name="userName" value="****"&gt;&lt;/property&gt;
           &lt;property name="password" value="****"&gt;&lt;/property&gt;
           &lt;property name="url" value="********"&gt;&lt;/property&gt;         
           &lt;property name="action" value="updateData"&gt;&lt;/property&gt;
           &lt;iterate id="Item" expression="//itemList/item" sequential="true"&gt;
              &lt;target&gt;
                   &lt;sequence&gt;
                                   &lt;property name="DSP" expression="//DSP/text()"&gt;&lt;/property&gt;
                                   &lt;property name="USER" expression="//USER/text()"&gt;&lt;/property&gt;
                                   &lt;property name="PID" expression="//PID/text()"&gt;&lt;/property&gt;
                                   &lt;property name="PMJ" expression="//PMJ/text()"&gt;&lt;/property&gt;
                                   &lt;property name="PMT" expression="//PMT/text()"&gt;&lt;/property&gt;
                                   &lt;property name="NZPO" expression="//NZPO/text()"&gt;&lt;/property&gt;
                                   &lt;property name="PD" expression="//PD/text()"&gt;&lt;/property&gt;
                                   &lt;property name="SD" expression="//SD/text()"&gt;&lt;/property&gt;
                                   &lt;class name="com.esb.integration.mediators.DbLookup"&gt;&lt;/class&gt;
                                   &lt;log separator=",**after updatedb call**" description=""&gt;&lt;/log&gt;
  
                   &lt;/sequence&gt;
                   &lt;/target&gt;
                   &lt;/iterator&gt;         
           &lt;/inSequence&gt;
           &lt;loopback/&gt;
            &lt;outSequence/&gt;
          &lt;parameter name="transport.jms.ContentType"&gt;application/json&lt;/parameter&gt;
      &lt;parameter name="transport.jms.Destination"&gt;TestProxy.Q&lt;/parameter&gt;
  &lt;/proxy&gt;
  </code></pre>
  
  <p>But,I can only see the "<strong>after updatedb call</strong>" message in logs when the query is executing successfully.</p>
  
  <p>What should I add/modify above to get the message(which are written as <code>System.out.println(" "))</code> in the WSO2 logs?</p>