-
1. Re: Slf4j + Logback in JBoss-Fuse-6.1.0
davsclaus Mar 10, 2014 3:40 AM (in response to onizuka83)You need to configure pax logging to use logback, there is some pointers form this SO
-
2. Re: Slf4j + Logback in JBoss-Fuse-6.1.0
onizuka83 Mar 10, 2014 12:41 PM (in response to davsclaus)These are the lines i added in the startup.properties:
org/codehaus/janino/com.springsource.org.codehaus.janino/2.6.1/com.springsource.org.codehaus.janino-2.6.1.jar=7
org/codehaus/janino/com.springsource.org.codehaus.commons.compiler/2.6.1/com.springsource.org.codehaus.commons.compiler-2.6.1.jar=7
org/ops4j/pax/logging/pax-logging-api/1.7.1/pax-logging-api-1.7.1.jar=8
org/ops4j/pax/logging/pax-logging-service/1.7.1/pax-logging-service-1.7.1.jar=8
org/ops4j/pax/logging/pax-logging-logback/1.7.1/pax-logging-logback-1.7.1.jar=8
I added also the jars needed in the correct path under "system".
And this is my logback.xml:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<!-- encoders are assigned the type
ch.qos.logback.classic.encoder.PatternLayoutEncoder by default -->
<encoder>
<pattern>%d{HH:mm:ss} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${karaf.data}/data/log/fuseee.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
<!-- daily rollover -->
<fileNamePattern>${karaf.data}/data/log/fuse.%d{yyyy-MM-dd}.%i.gz</fileNamePattern>
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
<!-- or whenever the file size reaches 100MB -->
<maxFileSize>100MB</maxFileSize>
</timeBasedFileNamingAndTriggeringPolicy>
<!-- keep 30 days worth of history -->
<maxHistory>30</maxHistory>
</rollingPolicy>
<append>true</append>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
<appender name="osgi:VmLogAppender">
</appender>
<root level="debug">
<appender-ref ref="osgi:VmLogAppender"/>
<appender-ref ref="FILE"/>
<appender-ref ref="STDOUT"/>
</root>
</configuration>
But i can't see any log output from the applications deployed in the container. Can someone help me out?
Thanks
-
3. Re: Slf4j + Logback in JBoss-Fuse-6.1.0
vamshi.chilukamarri Jun 17, 2014 11:27 AM (in response to onizuka83)Hi Mario,
were you able to resolve this. I am also facing the same issue, where my logs dont write inspite of activity in the runtime.
Thanks
-
4. Re: Slf4j + Logback in JBoss-Fuse-6.1.0
muthu8891 Apr 9, 2015 4:18 PM (in response to onizuka83)I'm also facing the same issue, Please help me if someone has a solution.