xxtesaxx
xxtesaxx

Reputation: 6419

IntelliJ doesn't show external Quarkus log files when debugging

I'm using IntelliJ 2023.1.3 (Ultimate Edition) to develop a Quarkus application. I have a run configuration where under Environment > Logs, I added all the log files my application is writing like so:

enter image description here

When I now run/debug my app, IntelliJ never shows any log files except for the console log of the app.

According to the documentation, the log files should show up as individual tabs in IntelliJ but nothing shows up. First I thought maybe it's some configuration issue of my app but even with a new project where all I do is add the log config to the application.properties, the logs are not shown.

My config looks like this:

quarkus.log.handler.file."test".enable=true
quarkus.log.handler.file."test".level=DEBUG
quarkus.log.handler.file."test".path=./test.log
quarkus.log.handler.file."test".rotation.max-file-size=200M
quarkus.log.handler.file."test".rotation.max-backup-index=5
quarkus.log.handler.file."test".rotation.rotate-on-boot=false
quarkus.log.handler.file."test".rotation.file-suffix=.yyyy-MM-dd
quarkus.log.handler.file."test".format=TEST: %C %-5p %s%e%n
quarkus.log.category."test".use-parent-handlers=false
quarkus.log.category."test".handlers=test

I can see log entries in the log file but nothing in IntelliJ:

enter image description here

Of course I could just use the use-parent-handlers=true option but then all logs are written to the console and I would like to have them in separate tabs.

What am I doing wrong? Is this a bug with quarkus run configurations or did I understand the documentation wrong? A couple of years ago I developed a SpringBoot app with Tomcat as the application server and there this functionality worked flawless.

I tried placing the logfile outside of the project directory (e.g. ~/logs/) as well as inside the target folder (e.g. ./target/logs/) but that didn't help. I'm a bit lost and are not sure how I would even debug IntelliJ to see whats going on under the hood.

Upvotes: 0

Views: 350

Answers (0)

Related Questions