Skip to content

Convert logging-gelf to use @ConfigMapping #45900

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

Merged
merged 1 commit into from
Jan 28, 2025

Conversation

mcruzdev
Copy link
Contributor

Part of #45446

@gsmet gsmet changed the title Convert gelf-loggin to use @ConfigMapping Convert gelf-logging to use @ConfigMapping Jan 27, 2025
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks. I suspect this one needs a few tweaks.

@@ -53,32 +53,30 @@ public class GelfConfig {
* Negative throwable reference walk the exception chain from the root cause side: -1 will extract the root cause,
* -2 the exception wrapping the root cause, ...
*/
@ConfigItem
public int stackTraceThrowableReference;
int stackTraceThrowableReference();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My experience is that you will need a default value for this one and the boolean below (and maybe others).

The defaults for primitives need to be explicit with config mapping.

Copy link
Contributor Author

@mcruzdev mcruzdev Jan 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I add the default int and boolean values?

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, for primitive ints, you need @WithDefault("0") if there is no defaults. For primitive booleans, you need @WithDefault("false") if there is no defaults.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(Same for longs, shorts, ...)

This comment has been minimized.

This comment has been minimized.

Copy link

github-actions bot commented Jan 27, 2025

🎊 PR Preview 02dda9d has been successfully built and deployed to https://quarkus-pr-main-45900-preview.surge.sh/version/main/guides/

  • Images of blog posts older than 3 months are not available.
  • Newsletters older than 3 months are not available.

@gsmet gsmet changed the title Convert gelf-logging to use @ConfigMapping Convert logging-gelf to use @ConfigMapping Jan 28, 2025

This comment has been minimized.

This comment has been minimized.

@gsmet gsmet force-pushed the config-gelf-logging branch from 5d2c22e to 16e6154 Compare January 28, 2025 15:30
Copy link
Member

@gsmet gsmet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to go, I squashed the commits.

@gsmet gsmet added the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 28, 2025
Copy link

quarkus-bot bot commented Jan 28, 2025

Status for workflow Quarkus CI

This is the status report for running Quarkus CI on commit 16e6154.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

Warning

There are other workflow runs running, you probably need to wait for their status before merging.

You can consult the Develocity build scans.

Copy link

quarkus-bot bot commented Jan 28, 2025

Status for workflow Quarkus Documentation CI

This is the status report for running Quarkus Documentation CI on commit 16e6154.

✅ The latest workflow run for the pull request has completed successfully.

It should be safe to merge provided you have a look at the other checks in the summary.

@gsmet gsmet merged commit a493925 into quarkusio:main Jan 28, 2025
22 checks passed
@quarkus-bot quarkus-bot bot removed the triage/waiting-for-ci Ready to merge when CI successfully finishes label Jan 28, 2025
@quarkus-bot quarkus-bot bot added this to the 3.19 - main milestone Jan 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants