So now we have finally found the causes of our logging problems. They seem to be due to a number of deliberate design decisions: - Pax Logging assumes all bundles share the same RootLogger - Tomcat Juli creates new RootLogger for every contextClassLoader - CXF overrides contextClassLoader during message handling and the result is that CXF message logging takes place in a RootLogger that Pax isn't aware of. I understand none of these decisions have been made by the Karaf project, but I'd really appreciate some hints on what project is best to bring this up in, CXF or Pax? Thanks Mike Mike Wilson wrote:
We are running Karaf 2.3.0 embedded in a webapp running on Tomcat (similar to the "web" demo in the distribution). We have configured logging so CXF messages will be logged to a separate log file. Though, we are currently investigating a problem where CXF logging sometimes end up in catalina.out instead of in the dedicated log file. The problem is quite reproducable and stable in some setups, but not in other, so we are not really sure yet what is the triggering factor. When debugging the problem we can see that the Pax j.u.l JdkHandler is missing from the Logger chain used by the CXF message logging code, and instead reach juli's FileHandler, while the CXF classes themselves correctly have the Pax Logger in their chain. We have struggled with this quite a bit without getting very far, so any hints or pointers would be great :-) Thanks Mike Wilson
