cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Paolo Perliti (JIRA)" <j...@apache.org>
Subject [jira] [Created] (CXF-7518) Loggers logs request twice in case of Fault
Date Tue, 26 Sep 2017 12:56:00 GMT
Paolo Perliti created CXF-7518:
----------------------------------

             Summary: Loggers logs request twice in case of Fault
                 Key: CXF-7518
                 URL: https://issues.apache.org/jira/browse/CXF-7518
             Project: CXF
          Issue Type: Bug
          Components: logging
    Affects Versions: 3.2.0
         Environment: JDK 1.8.0
Apache Tomcat 8.5
CXF 3.2.0
Implementation logging: org.apache.cxf.common.logging.Slf4jLogger
            Reporter: Paolo Perliti
            Priority: Minor


I upgraded CFX libraries from 3.0.11 to 3.2.0.
Since then requests raising faults are logged twice.

{code:title=CXFNonSpringExampleServlet.java|borderStyle=solid}
   @Override
   public void loadBus(ServletConfig servletConfig) {
      super.loadBus(servletConfig);
      BusFactory.setDefaultBus(getBus());

      createFactoryBean();
   }

   /* Creazione istanza servizio */
   private void createFactoryBean() {
      JaxWsServerFactoryBean serviceFactory = new JaxWsServerFactoryBean();

      /* Service details */
      serviceFactory.setAddress("/");
      serviceFactory.setWsdlLocation("...");
      serviceFactory.setServiceBean(...);
      serviceFactory.setServiceClass(...);
      serviceFactory.setServiceName(new QName("urn:...", "..."));
      serviceFactory.setEndpointName(new QName("urn:...", "..."));

      /* Input inteceptors */
      serviceFactory.getInInterceptors().add(new LoggingInInterceptor());
      serviceFactory.getInFaultInterceptors().add(new LoggingInInterceptor());

      /* Output inteceptors */
      serviceFactory.getOutInterceptors().add(new LoggingOutInterceptor());
      serviceFactory.getOutFaultInterceptors().add(new LoggingOutInterceptor());

      server = serviceFactory.create();
 }
{code}

Requests that do not raise faults are logged only once (as well as their responses): _one_
REQ_IN INFO  -> REQ_IN and _one_ RESP_OUT INFO  -> RESP_OUT

Requests that do raise faults are logged twice (unlike their responses, logged only once):
_*{color:red}two{color}*_ REQ_IN INFO  -> REQ_IN and _one_ FAULT_OUT INFO  -> FAULT_OUT





--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message