I'm working on java web project. I use Wildfly 10. I want to use it with logback. I did some configuration:
pom.xml
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.24</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.2.1</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.2.1</version>
</dependency>
logback.xml
<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true">
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender" >
<encoder>
<pattern>[%date] [%thread] [%-5level] [%logger{36}] - %msg%n </pattern>
</encoder>
</appender>
<logger name="com.pr" level="debug" additivity="false">
<appender-ref ref="STDOUT" />
</logger>
<root level="debug">
<appender-ref ref="STDOUT" />
</root>
</configuration>
jboss-deployment-structure.xml
<jboss-deployment-structure>
<deployment>
<exclude-subsystems>
<subsystem name="logging" />
</exclude-subsystems>
</deployment>
</jboss-deployment-structure>
The problem is that I was expecting ouput like:
[2017-02-26 12:32:23,671] [ServerService Thread Pool -- 179] [DEBUG] [o.springframework.jndi.JndiTemplate] - Looking up JNDI
But I'm getting:
12:32:23,671 INFO [stdout] (ServerService Thread Pool -- 179) [2017-02-26 12:32:23,671] [ServerService Thread Pool -- 179] [DEBUG] [o.springframework.jndi.JndiTemplate] - Looking up JNDI
So it looks like jboss is adding something at the beginning. How to prevent it ?