2 Replies Latest reply on Apr 17, 2008 12:47 AM by Hitesh Rathod

    Logging from a custom action

    Earnest Dyke Novice

      Greetings all,

      I have a custom action (see below) from which I am trying to log debug info to the JBoss server.log. The only output I see however is from the System.out.println. Should I not be able to use log4j logging from within an action?

      Thanks in advance for any and all help!

      Earnie!

      package org.ebsinc.itbridge.action;
      
      import org.apache.log4j.Logger;
      import org.jboss.soa.esb.actions.AbstractActionPipelineProcessor;
      import org.jboss.soa.esb.actions.ActionProcessingException;
      import org.jboss.soa.esb.helpers.ConfigTree;
      import org.jboss.soa.esb.message.Message;
      
      public class TestAction extends AbstractActionPipelineProcessor {
       private Logger log = Logger.getLogger(TestAction.class);
      
       protected ConfigTree config;
      
       public TestAction(ConfigTree config) {
       this.config = config;
       }
      
       public Message process(Message message) throws ActionProcessingException {
       System.out.println("TestAction is processing");
       log.debug("TestAction is processing");
       message.getBody().add("targetId", new Integer(8));
       log.debug("TestAction is complete");
       return message;
       }
      
      }