[ 
https://issues.apache.org/jira/browse/CXF-7807?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

James Main updated CXF-7807:
----------------------------
    Description: 
The setPrettyLogging(true) does not appear to be working with the class 
org.apache.cxf.ext.logging.LoggingFeature

It does however still work with the deprecated class 
org.apache.cxf.feature.LoggingFeature.

Here is my code snippet -->

{{    @Bean}}
{{    public Bus bus() {}}
{{        bus.setFeatures(Collections.singletonList(loggingFeature()));}}
{{        return bus;}}
{{    }}}

{{    private LoggingFeature loggingFeature() {}}
{{        LoggingFeature loggingFeature = new LoggingFeature();}}
{{        loggingFeature.setLimit(-1);}}
{{        loggingFeature.setPrettyLogging(true);}}
{{        return loggingFeature;}}
{{    }}}{{    @Bean}}

We have the following in our pom.xml file -->

{{        <dependency>}}
{{            <groupId>org.apache.cxf</groupId>}}
{{            <artifactId>cxf-rt-features-logging</artifactId>}}
{{            <version>3.2.5</version>}}
{{        </dependency>}}

If I use the deprecated LoggingFeature class, my outgoing/incoming SOAP 
messages are pretty-printed whereas if I swap-in the new LoggingFeature class, 
those messages are _not_ pretty-printed.My team lead & I have tried to figure 
it out and could not. We are not newbies at this sort of thing.

Can anyone tell us what we are doing wrong?

Thanks,

James

  was:
The setPrettyLogging(true) does not appear to be working with the class 
org.apache.cxf.ext.logging.LoggingFeature

It does however still work with the deprecated class 
org.apache.cxf.feature.LoggingFeature.

Here is my code snippet -->

    @Bean
    public Bus bus() {
        bus.setFeatures(Collections.singletonList(loggingFeature()));
        return bus;
    }

    private LoggingFeature loggingFeature() {
        LoggingFeature loggingFeature = new LoggingFeature();
        loggingFeature.setLimit(-1);
        loggingFeature.setPrettyLogging(true);
        return loggingFeature;
    }

If I use the deprecated LoggingFeature class, my outgoing/incoming SOAP 
messages are pretty-printed whereas if I swap-in the new LoggingFeature class, 
those messages are _not_ pretty-printed.

I also noticed the deprecation message in org.apache.cxf.feature.LoggingFeature 
is -->

 * @deprecated use the logging module rt/features/logging instead

I have no idea what this means. I tried looking though the CXF documentation 
and found nothing.

My team lead & I have tried to figure it out and could not. We are not newbies 
at this sort of thing.

Can anyone tell us what we are doing wrong?

Thanks,

James


> org.apache.cxf.ext.logging.LoggingFeature.setPrettyLogging(true) not working
> ----------------------------------------------------------------------------
>
>                 Key: CXF-7807
>                 URL: https://issues.apache.org/jira/browse/CXF-7807
>             Project: CXF
>          Issue Type: Test
>          Components: Bus
>    Affects Versions: 3.2.5
>         Environment: Java 8
> Apache CXF 3.2.5
>            Reporter: James Main
>            Priority: Minor
>              Labels: logging, prettyprint
>
> The setPrettyLogging(true) does not appear to be working with the class 
> org.apache.cxf.ext.logging.LoggingFeature
> It does however still work with the deprecated class 
> org.apache.cxf.feature.LoggingFeature.
> Here is my code snippet -->
> {{    @Bean}}
> {{    public Bus bus() {}}
> {{        bus.setFeatures(Collections.singletonList(loggingFeature()));}}
> {{        return bus;}}
> {{    }}}
> {{    private LoggingFeature loggingFeature() {}}
> {{        LoggingFeature loggingFeature = new LoggingFeature();}}
> {{        loggingFeature.setLimit(-1);}}
> {{        loggingFeature.setPrettyLogging(true);}}
> {{        return loggingFeature;}}
> {{    }}}{{    @Bean}}
> We have the following in our pom.xml file -->
> {{        <dependency>}}
> {{            <groupId>org.apache.cxf</groupId>}}
> {{            <artifactId>cxf-rt-features-logging</artifactId>}}
> {{            <version>3.2.5</version>}}
> {{        </dependency>}}
> If I use the deprecated LoggingFeature class, my outgoing/incoming SOAP 
> messages are pretty-printed whereas if I swap-in the new LoggingFeature 
> class, those messages are _not_ pretty-printed.My team lead & I have tried to 
> figure it out and could not. We are not newbies at this sort of thing.
> Can anyone tell us what we are doing wrong?
> Thanks,
> James



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to