Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

quarkus.log.console.format not applied in production with QuarkusHttpFunction #702

Open
mdietrichstein opened this issue Oct 29, 2024 · 0 comments

Comments

@mdietrichstein
Copy link

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:

  • 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!

@mdietrichstein mdietrichstein changed the title quarkus.log.console.format Not Applied in Production with QuarkusHttpFunction quarkus.log.console.format not Applied in Production with QuarkusHttpFunction Oct 29, 2024
@mdietrichstein mdietrichstein changed the title quarkus.log.console.format not Applied in Production with QuarkusHttpFunction quarkus.log.console.format not applied in production with QuarkusHttpFunction Oct 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant