Hello all So running Quarkus with
JavaScript
x
mvn quarkus:dev
does not output any loggin from my tests, however using the test environment
JavaScript
mvn quarkus:test
does output logs. I can’t seem to figure out why..
In my pom.xml i have configured the logmanager
JavaScript
<artifactId>maven-surefire-plugin</artifactId>
<version>${surefire-plugin.version}</version>
<configuration>
<systemPropertyVariables>
<java.util.logging.manager>org.jboss.logmanager.LogManager</java.util.logging.manager>
<quarkus.log.level>DEBUG</quarkus.log.level>
<maven.home>${maven.home}</maven.home>
</systemPropertyVariables>
and in my application.properties i have
JavaScript
quarkus.log.level=DEBUG
quarkus.log.category."org.hibernate".level=DEBUG
In my test i have
JavaScript
private static final Logger LOG = Logger.getLogger(VillainResourceTest.class);
@Test
void testLogg() {
LOG.debug("asdfasdf");
}
But this only prints in test mode. How do i configure it for dev mode?
Advertisement
Answer
Test output from continuous testing (in dev mode) can be turned on/off by hitting the o
key in the terminal (when the window with Quarkus is in focus). The logs from tests will get mixed up with logs from the dev mode instance, so it can get a bit confusing.