Hello all So running Quarkus with
mvn quarkus:dev
does not output any loggin from my tests, however using the test environment
mvn quarkus:test
does output logs. I can’t seem to figure out why..
In my pom.xml i have configured the logmanager
<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
quarkus.log.level=DEBUG quarkus.log.category."org.hibernate".level=DEBUG
In my test i have
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.