quarkusio / quarkus

Quarkus: Supersonic Subatomic Java.
https://quarkus.io
Apache License 2.0
13.57k stars 2.63k forks source link

'quarkus.log.console.format' '%i' Process ID fixed at build time #39854

Closed ramiswailem closed 4 months ago

ramiswailem commented 5 months ago

Describe the bug

it looks like 'Process ID' is fixed at build time when running in native mode. In JVM mode works as expected.

Expected behavior

the process ID is different every run

Actual behavior

the process ID is always the same

How to Reproduce?

  1. create the app quarkus create app org.acme:getting-started --extension='rest' && cd getting-started
  2. edit the application.properties to include the format: quarkus.log.console.format=%d{yyyy-MM-dd HH:mm:ss.SSS} %i%n
  3. build the native executable mvn package -Pnative -Dmaven.test.skip=true
  4. run the app ./target/getting-started-1.0.0-SNAPSHOT-runner
  5. close and run the app again

root@- /getting-started # ./target/getting-started-1.0.0-SNAPSHOT-runner 2024-04-03 09:47:28.286 181019 2024-04-03 09:47:28.286 181019 2024-04-03 09:47:28.286 181019 ^C2024-04-03 09:47:30.899 181019 root@- /getting-started # ./target/getting-started-1.0.0-SNAPSHOT-runner 2024-04-03 09:47:31.911 181019 2024-04-03 09:47:31.911 181019 2024-04-03 09:47:31.911 181019 ^C2024-04-03 09:49:08.309 181019

Output of uname -a or ver

Linux rubin-ec84.de 6.1.0-9-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.27-1 (2023-05-08) x86_64 GNU/Linux

Output of java -version

java version "21.0.2" 2024-01-16 LTS Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing)

Mandrel or GraalVM version (if different from Java)

java version "21.0.2" 2024-01-16 LTS Java(TM) SE Runtime Environment Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30) Java HotSpot(TM) 64-Bit Server VM Oracle GraalVM 21.0.2+13.1 (build 21.0.2+13-LTS-jvmci-23.1-b30, mixed mode, sharing)

Quarkus version or git rev

3.9.1

Build tool (ie. output of mvnw --version or gradlew --version)

Apache Maven 3.9.5 (57804ffe001d7215b5e7bcb531cf83df38f93546)

Additional information

No response

quarkus-bot[bot] commented 5 months ago

/cc @Karm (mandrel), @galderz (mandrel), @zakkak (mandrel)

dmlloyd commented 5 months ago

Fixed in smallrye/smallrye-common#299 and jboss-logging/jboss-logmanager#464. Either component update should take care of the issue.

geoand commented 5 months ago

@dmlloyd cool. I assume we can get new releases soon?

dmlloyd commented 5 months ago

Yeah ASAP.

geoand commented 5 months ago

🙏