0

I am using cxf logging feature in a osgi bundle within karaf 3.0.3. (cxf version is 3.0.3)

In my blueprint I defined cxf logging feature

<?xml version="1.0" encoding="UTF-8"?>
<blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
    xmlns:cxf="http://cxf.apache.org/blueprint/core" 
    xmlns:jaxws="http://cxf.apache.org/blueprint/jaxws">

    <cxf:bus>
        <cxf:features>
            <cxf:logging />
        </cxf:features>
    </cxf:bus>
...

In my log4j configuration I defined a logger and appender for rootLogger and for cxf messages. That works fine:

log4j.rootLogger=INFO, out
log4j.logger.org.apache.cxf.services=INFO, cxf_ws_messages_all

The problem is, that cxf logs all messages into my "cxf_ws_messages_all" appender and in "out" appender. Does anyone know how to configure cxf logging not to use rootLogger?

A second problem occurring if using xcf logging feature is that in the "out" appender also gets debug logs. The only way I was able to fix this was setting the Threshold of "out" appender to INFO:

log4j.appender.out.Threshold=INFO

Thanks for any help.

trayki
  • 1
  • 2

1 Answers1

0

have you tryed turning off additivity?

log4j.additivity.org.apache.cxf.services=false

Andrey
  • 4,020
  • 21
  • 35
Viktor D
  • 136
  • 1
  • 7
  • 1
    This does not provide an answer to the question. To critique or request clarification from an author, leave a comment below their post - you can always comment on your own posts, and once you have sufficient [reputation](http://stackoverflow.com/help/whats-reputation) you will be able to [comment on any post](http://stackoverflow.com/help/privileges/comment). – MichaelChirico Jul 29 '15 at 19:47
  • This provides answer to question: "Does anyone know how to configure cxf logging not to use rootLogger?" – Viktor D Aug 03 '15 at 07:32