You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Nathaniel Auvil <na...@gmail.com> on 2009/06/30 19:40:06 UTC

logging documentation bug

Just wanted to point out the logging documentation under the REST section is
incorrect.  The documentation says to add the following to your beans.xml:

<jaxrs:server>
<jaxrs:features>
     <cxf:logging/>
</jaxrs:features>
<jaxrs:server>

I got it to work by doing the following:

<jaxrs:server>
<jaxrs:features>
  <ref bean="loggingFeature" />
</jaxrs:features>
<jaxrs:server>
...
<bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature" />

Re: logging documentation bug

Posted by Sergey Beryozkin <sb...@progress.com>.
I fixed this documentation bug, please make sure

xmlns:cxf="http://cxf.apache.org/core" is available on the bean element, 

and update xsi:schemaLocations :
"http://cxf.apache.org/core http://cxf.apache.org/schemas/core.xsd"

thanks, Sergey

----- Original Message ----- 
From: "Nathaniel Auvil" <na...@gmail.com>
To: <us...@cxf.apache.org>
Sent: Tuesday, June 30, 2009 6:40 PM
Subject: logging documentation bug


> Just wanted to point out the logging documentation under the REST section is
> incorrect.  The documentation says to add the following to your beans.xml:
> 
> <jaxrs:server>
> <jaxrs:features>
>     <cxf:logging/>
> </jaxrs:features>
> <jaxrs:server>
> 
> I got it to work by doing the following:
> 
> <jaxrs:server>
> <jaxrs:features>
>  <ref bean="loggingFeature" />
> </jaxrs:features>
> <jaxrs:server>
> ...
> <bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature" />
>

Re: logging documentation bug

Posted by Sergey Beryozkin <sb...@progress.com>.
Hi

> However, I configured logging on the cxf:bus, not on a single jaxrs:server instance

in this case you might want to add a bus attribute to a jaxrs:server - it should work too

cheers, Sergey

----- Original Message ----- 
From: "Wim Praet" <Wi...@ilias-solutions.com>
To: <us...@cxf.apache.org>
Sent: Friday, July 03, 2009 6:51 AM
Subject: RE: logging documentation bug


Hi Sergey,
yes it's working correctly now. Don't know why it didn't work anymore, I
already had the cxf namespace declaration, but on separate lines...
maybe that was the culprit. However, I configured logging on the
cxf:bus, not on a single jaxrs:server instance. Thanks for your example,
the unit-tests are extremely helpful to figure things out.

-Wim.

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozk@progress.com] 
Sent: donderdag 2 juli 2009 11:44
To: users@cxf.apache.org
Subject: Re: logging documentation bug

Hi

are you still seeing <cxf:logging/> not working ? I posted an update
yesterday,

see this example :

http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/resources/ja
xrs/WEB-INF/beans.xml

look at 'bookservice3' endpoint, note that a 'cxf' has to be bound to a
namespace declaration, see <beans> opening tag.
If you still can't make it work then can you please send a stack trace ?
Or is it simply ignored in your case ?

cheers, Sergey


----- Original Message ----- 
From: "Wim Praet" <Wi...@ilias-solutions.com>
To: <us...@cxf.apache.org>
Sent: Wednesday, July 01, 2009 8:24 AM
Subject: RE: logging documentation bug


In fact the <jaxrs:feature> config below is the same as doing:

   <jaxrs:server>
<jaxrs:inInterceptors>
<bean
class="org.apache.cxf.interceptor.LoggingInInterceptor" />
</jaxrs:inInterceptors>
<jaxrs:outInterceptors>
<bean
class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
</jaxrs:outInterceptors>
    </jaxrs:server>

I couldn't get it to work eiher with the <cxf:logging/> setting,
although that works fine for jaxws endpoints.

-Wim.

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozk@progress.com] 
Sent: dinsdag 30 juni 2009 21:36
To: users@cxf.apache.org
Subject: RE: logging documentation bug

Hi,

What error did you see when using <cxf:logging/> ? 
I can see it's been defined here :
http://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/resources/sch
emas/core.xsd

cheers, Sergey 

-----Original Message-----
From: Nathaniel Auvil [mailto:nathaniel.auvil@gmail.com]
Sent: 30 June 2009 18:40
To: users@cxf.apache.org
Subject: logging documentation bug

Just wanted to point out the logging documentation under the REST
section is incorrect.  The documentation says to add the following to
your
beans.xml:

<jaxrs:server>
<jaxrs:features>
     <cxf:logging/>
</jaxrs:features>
<jaxrs:server>

I got it to work by doing the following:

<jaxrs:server>
<jaxrs:features>
  <ref bean="loggingFeature" />
</jaxrs:features>
<jaxrs:server>
...
<bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature"
/>


RE: logging documentation bug

Posted by Wim Praet <Wi...@ilias-solutions.com>.
Hi Sergey,
yes it's working correctly now. Don't know why it didn't work anymore, I
already had the cxf namespace declaration, but on separate lines...
maybe that was the culprit. However, I configured logging on the
cxf:bus, not on a single jaxrs:server instance. Thanks for your example,
the unit-tests are extremely helpful to figure things out.

-Wim.

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozk@progress.com] 
Sent: donderdag 2 juli 2009 11:44
To: users@cxf.apache.org
Subject: Re: logging documentation bug

Hi

are you still seeing <cxf:logging/> not working ? I posted an update
yesterday,

see this example :

http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/resources/ja
xrs/WEB-INF/beans.xml

look at 'bookservice3' endpoint, note that a 'cxf' has to be bound to a
namespace declaration, see <beans> opening tag.
If you still can't make it work then can you please send a stack trace ?
Or is it simply ignored in your case ?

cheers, Sergey


----- Original Message ----- 
From: "Wim Praet" <Wi...@ilias-solutions.com>
To: <us...@cxf.apache.org>
Sent: Wednesday, July 01, 2009 8:24 AM
Subject: RE: logging documentation bug


In fact the <jaxrs:feature> config below is the same as doing:

   <jaxrs:server>
<jaxrs:inInterceptors>
<bean
class="org.apache.cxf.interceptor.LoggingInInterceptor" />
</jaxrs:inInterceptors>
<jaxrs:outInterceptors>
<bean
class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
</jaxrs:outInterceptors>
    </jaxrs:server>

I couldn't get it to work eiher with the <cxf:logging/> setting,
although that works fine for jaxws endpoints.

-Wim.

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozk@progress.com] 
Sent: dinsdag 30 juni 2009 21:36
To: users@cxf.apache.org
Subject: RE: logging documentation bug

Hi,

What error did you see when using <cxf:logging/> ? 
I can see it's been defined here :
http://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/resources/sch
emas/core.xsd

cheers, Sergey 

-----Original Message-----
From: Nathaniel Auvil [mailto:nathaniel.auvil@gmail.com]
Sent: 30 June 2009 18:40
To: users@cxf.apache.org
Subject: logging documentation bug

Just wanted to point out the logging documentation under the REST
section is incorrect.  The documentation says to add the following to
your
beans.xml:

<jaxrs:server>
<jaxrs:features>
     <cxf:logging/>
</jaxrs:features>
<jaxrs:server>

I got it to work by doing the following:

<jaxrs:server>
<jaxrs:features>
  <ref bean="loggingFeature" />
</jaxrs:features>
<jaxrs:server>
...
<bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature"
/>


Re: logging documentation bug

Posted by Sergey Beryozkin <sb...@progress.com>.
Great.
By the way, I've just applied a patch from Eamonn Dwyer for features be supported by restful clients too...

cheers, Sergey

----- Original Message ----- 
From: "Nathaniel Auvil" <na...@gmail.com>
To: <us...@cxf.apache.org>
Sent: Thursday, July 02, 2009 12:53 PM
Subject: Re: logging documentation bug


>i have it working now.  Thanks for the concern.
> 
> 
> 
> On Thu, Jul 2, 2009 at 5:44 AM, Sergey Beryozkin <sb...@progress.com>wrote:
> 
>> Hi
>>
>> are you still seeing <cxf:logging/> not working ? I posted an update
>> yesterday,
>>
>> see this example :
>>
>>
>> http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/resources/jaxrs/WEB-INF/beans.xml
>>
>> look at 'bookservice3' endpoint, note that a 'cxf' has to be bound to a
>> namespace declaration, see <beans> opening tag.
>> If you still can't make it work then can you please send a stack trace ? Or
>> is it simply ignored in your case ?
>>
>> cheers, Sergey
>>
>>
>> ----- Original Message ----- From: "Wim Praet" <
>> Wim.Praet@ilias-solutions.com>
>> To: <us...@cxf.apache.org>
>> Sent: Wednesday, July 01, 2009 8:24 AM
>> Subject: RE: logging documentation bug
>>
>>
>> In fact the <jaxrs:feature> config below is the same as doing:
>>
>>  <jaxrs:server>
>> <jaxrs:inInterceptors>
>> <bean
>> class="org.apache.cxf.interceptor.LoggingInInterceptor" />
>> </jaxrs:inInterceptors>
>> <jaxrs:outInterceptors>
>> <bean
>> class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
>> </jaxrs:outInterceptors>
>>   </jaxrs:server>
>>
>> I couldn't get it to work eiher with the <cxf:logging/> setting,
>> although that works fine for jaxws endpoints.
>>
>> -Wim.
>>
>> -----Original Message-----
>> From: Sergey Beryozkin [mailto:sberyozk@progress.com] Sent: dinsdag 30
>> juni 2009 21:36
>> To: users@cxf.apache.org
>> Subject: RE: logging documentation bug
>>
>> Hi,
>>
>> What error did you see when using <cxf:logging/> ? I can see it's been
>> defined here :
>> http://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/resources/sch
>> emas/core.xsd
>>
>> cheers, Sergey
>> -----Original Message-----
>> From: Nathaniel Auvil [mailto:nathaniel.auvil@gmail.com]
>> Sent: 30 June 2009 18:40
>> To: users@cxf.apache.org
>> Subject: logging documentation bug
>>
>> Just wanted to point out the logging documentation under the REST
>> section is incorrect.  The documentation says to add the following to
>> your
>> beans.xml:
>>
>> <jaxrs:server>
>> <jaxrs:features>
>>    <cxf:logging/>
>> </jaxrs:features>
>> <jaxrs:server>
>>
>> I got it to work by doing the following:
>>
>> <jaxrs:server>
>> <jaxrs:features>
>>  <ref bean="loggingFeature" />
>> </jaxrs:features>
>> <jaxrs:server>
>> ...
>> <bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature"
>> />
>>
>>
>

Re: logging documentation bug

Posted by Nathaniel Auvil <na...@gmail.com>.
i have it working now.  Thanks for the concern.



On Thu, Jul 2, 2009 at 5:44 AM, Sergey Beryozkin <sb...@progress.com>wrote:

> Hi
>
> are you still seeing <cxf:logging/> not working ? I posted an update
> yesterday,
>
> see this example :
>
>
> http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/resources/jaxrs/WEB-INF/beans.xml
>
> look at 'bookservice3' endpoint, note that a 'cxf' has to be bound to a
> namespace declaration, see <beans> opening tag.
> If you still can't make it work then can you please send a stack trace ? Or
> is it simply ignored in your case ?
>
> cheers, Sergey
>
>
> ----- Original Message ----- From: "Wim Praet" <
> Wim.Praet@ilias-solutions.com>
> To: <us...@cxf.apache.org>
> Sent: Wednesday, July 01, 2009 8:24 AM
> Subject: RE: logging documentation bug
>
>
> In fact the <jaxrs:feature> config below is the same as doing:
>
>  <jaxrs:server>
> <jaxrs:inInterceptors>
> <bean
> class="org.apache.cxf.interceptor.LoggingInInterceptor" />
> </jaxrs:inInterceptors>
> <jaxrs:outInterceptors>
> <bean
> class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
> </jaxrs:outInterceptors>
>   </jaxrs:server>
>
> I couldn't get it to work eiher with the <cxf:logging/> setting,
> although that works fine for jaxws endpoints.
>
> -Wim.
>
> -----Original Message-----
> From: Sergey Beryozkin [mailto:sberyozk@progress.com] Sent: dinsdag 30
> juni 2009 21:36
> To: users@cxf.apache.org
> Subject: RE: logging documentation bug
>
> Hi,
>
> What error did you see when using <cxf:logging/> ? I can see it's been
> defined here :
> http://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/resources/sch
> emas/core.xsd
>
> cheers, Sergey
> -----Original Message-----
> From: Nathaniel Auvil [mailto:nathaniel.auvil@gmail.com]
> Sent: 30 June 2009 18:40
> To: users@cxf.apache.org
> Subject: logging documentation bug
>
> Just wanted to point out the logging documentation under the REST
> section is incorrect.  The documentation says to add the following to
> your
> beans.xml:
>
> <jaxrs:server>
> <jaxrs:features>
>    <cxf:logging/>
> </jaxrs:features>
> <jaxrs:server>
>
> I got it to work by doing the following:
>
> <jaxrs:server>
> <jaxrs:features>
>  <ref bean="loggingFeature" />
> </jaxrs:features>
> <jaxrs:server>
> ...
> <bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature"
> />
>
>

Re: logging documentation bug

Posted by Sergey Beryozkin <sb...@progress.com>.
Hi

are you still seeing <cxf:logging/> not working ? I posted an update yesterday,

see this example :

http://svn.apache.org/repos/asf/cxf/trunk/systests/src/test/resources/jaxrs/WEB-INF/beans.xml

look at 'bookservice3' endpoint, note that a 'cxf' has to be bound to a namespace declaration, see <beans> opening tag.
If you still can't make it work then can you please send a stack trace ? Or is it simply ignored in your case ?

cheers, Sergey


----- Original Message ----- 
From: "Wim Praet" <Wi...@ilias-solutions.com>
To: <us...@cxf.apache.org>
Sent: Wednesday, July 01, 2009 8:24 AM
Subject: RE: logging documentation bug


In fact the <jaxrs:feature> config below is the same as doing:

   <jaxrs:server>
<jaxrs:inInterceptors>
<bean
class="org.apache.cxf.interceptor.LoggingInInterceptor" />
</jaxrs:inInterceptors>
<jaxrs:outInterceptors>
<bean
class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
</jaxrs:outInterceptors>
    </jaxrs:server>

I couldn't get it to work eiher with the <cxf:logging/> setting,
although that works fine for jaxws endpoints.

-Wim.

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozk@progress.com] 
Sent: dinsdag 30 juni 2009 21:36
To: users@cxf.apache.org
Subject: RE: logging documentation bug

Hi,

What error did you see when using <cxf:logging/> ? 
I can see it's been defined here :
http://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/resources/sch
emas/core.xsd

cheers, Sergey 

-----Original Message-----
From: Nathaniel Auvil [mailto:nathaniel.auvil@gmail.com]
Sent: 30 June 2009 18:40
To: users@cxf.apache.org
Subject: logging documentation bug

Just wanted to point out the logging documentation under the REST
section is incorrect.  The documentation says to add the following to
your
beans.xml:

<jaxrs:server>
<jaxrs:features>
     <cxf:logging/>
</jaxrs:features>
<jaxrs:server>

I got it to work by doing the following:

<jaxrs:server>
<jaxrs:features>
  <ref bean="loggingFeature" />
</jaxrs:features>
<jaxrs:server>
...
<bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature"
/>


RE: logging documentation bug

Posted by Wim Praet <Wi...@ilias-solutions.com>.
In fact the <jaxrs:feature> config below is the same as doing:

   <jaxrs:server>
		<jaxrs:inInterceptors>
			<bean
class="org.apache.cxf.interceptor.LoggingInInterceptor" />
		</jaxrs:inInterceptors>
		<jaxrs:outInterceptors>
			<bean
class="org.apache.cxf.interceptor.LoggingOutInterceptor" />
		</jaxrs:outInterceptors>
    </jaxrs:server>

I couldn't get it to work eiher with the <cxf:logging/> setting,
although that works fine for jaxws endpoints.

-Wim.

-----Original Message-----
From: Sergey Beryozkin [mailto:sberyozk@progress.com] 
Sent: dinsdag 30 juni 2009 21:36
To: users@cxf.apache.org
Subject: RE: logging documentation bug

Hi,

What error did you see when using <cxf:logging/> ? 
I can see it's been defined here :
http://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/resources/sch
emas/core.xsd

cheers, Sergey 

-----Original Message-----
From: Nathaniel Auvil [mailto:nathaniel.auvil@gmail.com]
Sent: 30 June 2009 18:40
To: users@cxf.apache.org
Subject: logging documentation bug

Just wanted to point out the logging documentation under the REST
section is incorrect.  The documentation says to add the following to
your
beans.xml:

<jaxrs:server>
<jaxrs:features>
     <cxf:logging/>
</jaxrs:features>
<jaxrs:server>

I got it to work by doing the following:

<jaxrs:server>
<jaxrs:features>
  <ref bean="loggingFeature" />
</jaxrs:features>
<jaxrs:server>
...
<bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature"
/>

RE: logging documentation bug

Posted by Sergey Beryozkin <sb...@progress.com>.
Hi,

What error did you see when using <cxf:logging/> ? 
I can see it's been defined here :
http://svn.apache.org/repos/asf/cxf/trunk/rt/core/src/main/resources/sch
emas/core.xsd

cheers, Sergey 

-----Original Message-----
From: Nathaniel Auvil [mailto:nathaniel.auvil@gmail.com] 
Sent: 30 June 2009 18:40
To: users@cxf.apache.org
Subject: logging documentation bug

Just wanted to point out the logging documentation under the REST
section is
incorrect.  The documentation says to add the following to your
beans.xml:

<jaxrs:server>
<jaxrs:features>
     <cxf:logging/>
</jaxrs:features>
<jaxrs:server>

I got it to work by doing the following:

<jaxrs:server>
<jaxrs:features>
  <ref bean="loggingFeature" />
</jaxrs:features>
<jaxrs:server>
...
<bean id="loggingFeature" class="org.apache.cxf.feature.LoggingFeature"
/>