]
Marco Tenti updated JBESB-3983:
-------------------------------
Summary: Can't show on fuse.log the SLF4j logger of my java project (was:
Can't show on ${karaf.data}/log/fuse.log the SLF4j logger)
Can't show on fuse.log the SLF4j logger of my java project
----------------------------------------------------------
Key: JBESB-3983
URL:
https://issues.jboss.org/browse/JBESB-3983
Project: JBoss ESB
Issue Type: Bug
Components: Application Server, Configuration, Registry and Repository
Environment: JBOSS FUSE KARAF : 7.3.0
S.O. : CENTO-OS 7.X.X
JAVA JDK : OpenJDK 64-Bit Server VM (build 25.212-b04, mixed mode)
SLF4J : 1.7.22
LOG4J2 : 2.9.0
Reporter: Marco Tenti
Priority: Major
Labels: Karaf, bundle, fuse, fuse.log, log4j2, slf4j
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
{code: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>
{code}
and here my bundle felix maven plugin configuration:
{code:xml}
<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 ABD -->
it.abd.webdesktop.client.*;version="${osgi.webdesktop-common.version}",
it.abd.properties;version="${osgi.webdesktop-common.version}",
<!-- 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>
{code}
and this is mine "/src/main/resources/log4j2.xml"
{code: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>
{code}
I can't find a solution to show my SLF4J log .
Can anyone help me?