Uploaded image for project: 'JBoss ESB'
  1. JBoss ESB
  2. JBESB-3983

Can't show on fuse.log the SLF4j logger of my java project

    Details

    • Estimated Difficulty:
      Medium

      Description

      I have finish to develop a maven "bundle" project for the fuse-karaf 7.3.0, the install on the karaf console it's oK (or at least say active), but i cannot see my SLF4J log on the fuse.log file.

      Here my logging dependencies on the pom.xml

      		<!-- Logging dependencies -->
      		 
      		<dependency>
      			<groupId>org.slf4j</groupId>
      			<artifactId>slf4j-api</artifactId>
      			<version>${version.org.slf4j}</version>
      			<scope>provided</scope>
      		</dependency>
      		<dependency>
      			<groupId>org.slf4j</groupId>
      			<artifactId>jcl-over-slf4j</artifactId>
      			<version>${version.org.slf4j}</version>
      			<scope>provided</scope>
      		</dependency>
      		<dependency>
      			<groupId>org.slf4j</groupId>
      			<artifactId>jul-to-slf4j</artifactId>
      			<version>${version.org.slf4j}</version>
      			<scope>provided</scope>
      		</dependency>
      		<dependency>
      			<groupId>org.slf4j</groupId>
      			<artifactId>slf4j-log4j12</artifactId>
      			<version>${version.org.slf4j}</version>
      			<scope>provided</scope>
      		</dependency>
      		<dependency>
      			<groupId>org.slf4j</groupId>
      			<artifactId>slf4j-nop</artifactId>
      			<version>${version.org.slf4j}</version>
      			<scope>provided</scope>
      		</dependency>
      		<dependency>
      			<groupId>org.apache.logging.log4j</groupId>
      			<artifactId>log4j-api</artifactId>
      			<version>${version.org.apache.logging.log4j}</version>
      			<scope>provided</scope>
      		</dependency>
      		<dependency>
      			<groupId>org.apache.logging.log4j</groupId>
      			<artifactId>log4j-core</artifactId>
      			<version>${version.org.apache.logging.log4j}</version>
      			<scope>provided</scope>
      		</dependency>
      		<dependency>
      			<groupId>org.apache.logging.log4j</groupId>
      			<artifactId>log4j-slf4j-impl</artifactId>
      			<version>${version.org.apache.logging.log4j}</version>
      			<scope>provided</scope>
      		</dependency>
      

      and here my bundle felix maven plugin configuration:

      
      			<plugin>
      				<groupId>org.apache.felix</groupId>
      				<artifactId>maven-bundle-plugin</artifactId>
      				<version>4.2.0</version>
      				<extensions>true</extensions>
      				<configuration>
      					<!-- <classifier>${classifier}</classifier> -->
      					<instructions>
      						<Bundle-SymbolicName>${bundle.symbolicName}</Bundle-SymbolicName>
      						<Bundle-Name>${bundle.name}</Bundle-Name>
      						<Bundle-Version>${project.version}</Bundle-Version>
      						<Bundle-Description>${project.description}</Bundle-Description>
      						<wrapImportPackage>;</wrapImportPackage>
      						<Embed-Transitive>false</Embed-Transitive>
      						<supportIncrementalBuild>true</supportIncrementalBuild>
      						<Embed-Dependency>*;scope=compile|runtime</Embed-Dependency>
      
      						<Export-Package>
      							!META-INF.certificati,
      							it.abd.esb.common.*,
      						</Export-Package>
      
      						<Import-Package>
      							<!-- DIPENDENZE SERVICEMIX -->
      							META-INF.cxf,
      							org.apache.cxf;version="${osgi.cxf.version}",
      							org.apache.cxf.*;version="${osgi.cxf.version}",
      							org.apache.camel;version="${osgi.camel.version}",
      							org.apache.camel.*;version="${osgi.camel.version}",
      							com.fasterxml.jackson.*;version="${osgi.jackson.version}",
      							org.springframework.*;version="${osgi.spring.version}",
      							org.apache.wss4j.*;version="${osgi.wss4j.version}",
      
      							<!-- DIPENDENZE ESTERNE -->
      							<!--
      							org.slf4j;version="${osgi.slf4j.version}",
      							org.slf4j.*;version="${osgi.slf4j.version}",
      							-->
      							org.apache.commons.mail;version="${osgi.commons-email.version}",
      							org.apache.commons.mail.*;version="${osgi.commons-email.version}",
      
      							org.apache.commons.io;version="${osgi.commons-io.version}",
      							org.apache.commons.io.*;version="${osgi.commons-io.version}",
      
      							org.apache.commons.lang3;version="${osgi.commons-lang3.version}",
      							org.apache.commons.lang3.*;version="${osgi.commons-lang3.version}",
      
      							org.apache.commons.codec;version="${osgi.commons-codec.version}",
      							org.apache.commons.codec.*;version="${osgi.commons-codec.version}",
      
      							org.apache.commons.collections4;version="${osgi.commons-collections4.version}",
      							org.apache.commons.collections4.*;version="${osgi.commons-collections4.version}",
      
      							org.bouncycastle;version="${osgi.bouncycastle.version}",
      							org.bouncycastle.*;version="${osgi.bouncycastle.version}",
      
      							com.mysql.cj,
      							com.mysql.cj.*,
      
      							org.apache.http;version="${osgi.httpcomponents.version}",
      							org.apache.http.*;version="${osgi.httpcomponents.version}",
      
      							com.lowagie.*;version="${osgi.openpdf.version}",
      
      							org.apache.pdfbox.*;version="${osgi.pdfbox.version}",
      							
      							org.apache.camel.component.xmlsecurity;version="${osgi.xmlsec.version}",
      							org.apache.camel.component.xmlsecurity.*;version="${osgi.xmlsec.version}",
      						</Import-Package>
      					</instructions>
      				</configuration>
      			</plugin>
      
      

      and this is mine "/src/main/resources/log4j2.xml"

      <?xml version="1.0" encoding="UTF-8"?>
      <Configuration status="debug" monitorInterval="60">
          <Appenders>
              <Console name="console" target="SYSTEM_OUT">
                  <PatternLayout
                      pattern="[%-5level] %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c{1} - %msg%n" />
              </Console>
          </Appenders>
          <Loggers>
              <Root level="debug" additivity="false">
                  <AppenderRef ref="console" />
              </Root>
          </Loggers>
      </Configuration>
      

      I can't find a solution to show my SLF4J log .
      Can anyone help me?

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tenti88 Marco Tenti
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: