Hi,

I'm fighting with the configuration of logging in ServiceMix 4. From what I have read, log4j is the default logging mechanism in SMX4. I have used the spring-osgi-bundle artifact to create a ServiceMix4 Bundle.

I want to use the logging API, I am using log4j (Logger class). However, when I compile, it seems that log4j is missing. I have tried playing with teh dependencies, but if I remove the exclusions (what are they for anyway ?) in com.springsource.slf4j.log4j, then the pom.xml claims it is missing some indirect dependencies. So.... I'm stuck :-(

Here is my dependency configuration:

   <dependencies>
       <dependency>
           <groupId>org.apache.cxf</groupId>
           <artifactId>cxf-rt-frontend-jaxws</artifactId>
           <version>2.2.2.0-fuse</version>
           <scope>provided</scope>
       </dependency>
       <dependency>
           <groupId>org.apache.geronimo.specs</groupId>
           <artifactId>geronimo-ws-metadata_2.0_spec</artifactId>
           <version>1.1.2</version>
       </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>
<artifactId>com.springsource.slf4j.org.apache.commons.logging</artifactId>
         <version>${slf4j.version}</version>
         <scope>provided</scope>
       </dependency>
       <!--  --><dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>com.springsource.slf4j.api</artifactId>
         <version>${slf4j.version}</version>
         <scope>provided</scope>
       </dependency>
       <dependency>
         <groupId>org.slf4j</groupId>
         <artifactId>com.springsource.slf4j.log4j</artifactId>
         <version>${slf4j.version}</version>
         <scope>provided</scope>
         <exclusions>
           <exclusion>
               <groupId>log4j</groupId>
               <artifactId>log4j</artifactId>
           </exclusion>
           <exclusion>
               <groupId>org.apache.log4j</groupId>
               <artifactId>com.springsource.org.apache.log4j</artifactId>
           </exclusion>
         </exclusions>
       </dependency>
       <dependency>
           <groupId>log4j</groupId>
           <artifactId>log4j</artifactId>
           <version>1.2.15</version>
           <type>jar</type>
           <scope>test</scope>
       </dependency>
   </dependencies>

Reply via email to