quarkus-workshops
quarkus-workshops copied to clipboard
version is not printed in VersionRecorder
I can't see the application version printed when using the version-extension in rest-villains

As you can see, the extension-version is present into the installed features, but the log INFO [io.qu.wo.su.ve.ru.VersionRecorder] (Quarkus Main Thread) Version: 1.0.0-SNAPSHOT is never printed.
Surprisingly, when adding a sysout in VersionRecorder.printVersion, the log becomes visible
public void printVersion(String version) {
System.out.println("Hello World !");
Logger.getLogger(VersionRecorder.class.getName()).infof("Version: %s", version);
}

I can't figure out what is going on, maybe this is related to my laptop (I use elementary os). I get the same behavior with both versions of quarkus 2.9.2.Final / 2.13.2.Final
@geoand didn't we have an issue like that, where the logging subsystem is initialized after the first logged messages? I was thinking we were collecting the messages and printed them after the initialization, but I may be wrong.
We do collect the messages the in-memory and then dump them when logging becomes available. If we have a sample application that shows this problem in action, I can take a look
It's related to the last part of the workshop.
You can reproduce the problem by starting rest-villain and set quarkus.version.enabled=true in application.properties
Thanks.
I'll try and have a look soon
I've just updated the workshop to Quarkus 2.14.0 and the version is displayed ok. @oliv37 can you try with 2.14.0 please?
@agoncal I just tried with the new version and I have the same problem.
Using System.out.println("Version: " + version); works, using Logger.getLogger(VersionRecorder.class.getName()).infof("Version: %s", version); doesn't work. It seems to be specific to my local environment, I don't really understand what is happening.
@oliv37 just to let you know that I've updated the code to Quarkus 2.15.3 (see #207) and the version is displayed ok. Can you check on your side with this new release?
Still the same behavior on my side, it doesn't print anything when using the Logger. The version is correctly displayed when using System.out.println