You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using Quarkus with Google Cloud Functions (2nd Gen) via the io.quarkus.gcp.functions.http.QuarkusHttpFunction entry point and are experiencing issues with logging configuration in production.
Problem Description
In our application, we’ve set a custom log format using the quarkus.log.console.format configuration property. Everything works as expected in development mode:
Our custom log format is applied.
MDC values and other logging settings appear correctly.
However, in production mode, these settings are ignored. The logs display only the plain log message without the custom format or MDC values.
Troubleshooting Steps
The closest related issue I could find is Issue #23400, which suggests setting _JAVA_OPTIONS="-Djava.util.logging.manager=org.jboss.logmanager.LogManager" as a workaround. We tried this configuration, but it caused a startup error due to org.jboss.logmanager.LogManager not being found on the classpath, even though it’s included in our UberJAR.
Temporary Workaround
We discovered that switching to org.slf4j.LoggerFactory instead of org.jboss.logging.Logger resolves the issue, and our logs work as expected in both development and production environments. However, according to the Quarkus documentation, jboss-logging is the recommended logging implementation, and we’d prefer to follow that suggestion.
Question
Is the behavior we’re experiencing a bug, or are we potentially missing an important configuration step for using jboss-logging in production? Any insight or guidance would be greatly appreciated.
Thank you!
The text was updated successfully, but these errors were encountered:
mdietrichstein
changed the title
quarkus.log.console.format Not Applied in Production with QuarkusHttpFunctionquarkus.log.console.format not Applied in Production with QuarkusHttpFunctionOct 29, 2024
mdietrichstein
changed the title
quarkus.log.console.format not Applied in Production with QuarkusHttpFunctionquarkus.log.console.format not applied in production with QuarkusHttpFunctionOct 29, 2024
Hello,
We are using Quarkus with Google Cloud Functions (2nd Gen) via the
io.quarkus.gcp.functions.http.QuarkusHttpFunction
entry point and are experiencing issues with logging configuration in production.Problem Description
In our application, we’ve set a custom log format using the
quarkus.log.console.format
configuration property. Everything works as expected in development mode:However, in production mode, these settings are ignored. The logs display only the plain log message without the custom format or MDC values.
Troubleshooting Steps
The closest related issue I could find is Issue #23400, which suggests setting
_JAVA_OPTIONS="-Djava.util.logging.manager=org.jboss.logmanager.LogManager"
as a workaround. We tried this configuration, but it caused a startup error due toorg.jboss.logmanager.LogManager
not being found on the classpath, even though it’s included in our UberJAR.Temporary Workaround
We discovered that switching to
org.slf4j.LoggerFactory
instead oforg.jboss.logging.Logger
resolves the issue, and our logs work as expected in both development and production environments. However, according to the Quarkus documentation,jboss-logging
is the recommended logging implementation, and we’d prefer to follow that suggestion.Question
Is the behavior we’re experiencing a bug, or are we potentially missing an important configuration step for using
jboss-logging
in production? Any insight or guidance would be greatly appreciated.Thank you!
The text was updated successfully, but these errors were encountered: