I am currently migrating from Wildfly 18 to 33, passing through version 26. I noticed that upon switching to 26, my application logs stopped appearing.
I made the following changes in my pom.xml:
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
</exclusion>
</exclusions>
</dependency>
I added the logback exclusion because I encountered this error:
LoggerFactory is not a Logback LoggerContext but Logback is on the classpath.
Either remove Logback or the competing implementation (class org.slf4j.impl.Slf4jLoggerFactory loaded from jar:file:/../wildfly-33.0.0.Final/modules/system/layers/base/org/slf4j/impl/main/slf4j-jboss-logmanager-2.0.1.Final.jar!/).
If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.impl.Slf4jLoggerFactory
Despite this error, the logs appear.
I am using org.jboss.logging.Logger
for logging.
Has anyone encountered this problem before? Do you have any suggestions?
Thanks in advance!
I accessed the console, where I had to reconfigure the standalone settings after the migration by removing ‘default-migration’ because I couldn’t connect anymore. I then removed and re-added the root-logger configuration. When I do this, the server displays my application logs again. However, upon restarting the server, the logs disappear.
Louis KRMK is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.