quarkusio / quarkus

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

JSON Logging does not affect Google Cloud Functions output #44609

Open andybarilla opened 1 day ago

andybarilla commented 1 day ago

Describe the bug

I have a project in Quarkus 3.15.1 which implements RawBackgroundFunction from quarkus-google-cloud-functions. I've included quarkus-logging-json as a dependency but it doesn't result in JSON output either running from java-function-invoker-1.3.1.jar or when deployed.

Specifically, I'm looking for MDC values to get logged.

Expected behavior

Should output JSON logs including MDC values

Actual behavior

Outputs standard text

How to Reproduce?

Example repo: https://github.com/andybarilla/json-gcf

Output of uname -a or ver

Darwin Mac.lan 24.1.0 Darwin Kernel Version 24.1.0: Thu Oct 10 21:03:11 PDT 2024; root:xnu-11215.41.3~2/RELEASE_ARM64_T6020 arm64

Output of java -version

openjdk version "21.0.2" 2024-01-16 OpenJDK Runtime Environment GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30) OpenJDK 64-Bit Server VM GraalVM CE 21.0.2+13.1 (build 21.0.2+13-jvmci-23.1-b30, mixed mode, sharing)

Quarkus version or git rev

3.15.1

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

Maven home: /Users/andy/.m2/wrapper/dists/apache-maven-3.9.8-bin/337e6d14/apache-maven-3.9.8 Java version: 21.0.2, vendor: GraalVM Community, runtime: /Library/Java/JavaVirtualMachines/graalvm-community-openjdk-21/Contents/Home Default locale: en_US, platform encoding: UTF-8 OS name: "mac os x", version: "15.1.1", arch: "aarch64", family: "mac"

Additional information

No response

quarkus-bot[bot] commented 1 day ago

/cc @loicmathieu (google-cloud)