-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Conversation
There was a problem hiding this 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(); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Same for longs, shorts, ...)
extensions/logging-gelf/runtime/src/main/java/io/quarkus/logging/gelf/GelfConfig.java
Show resolved
Hide resolved
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
🎊 PR Preview 02dda9d has been successfully built and deployed to https://quarkus-pr-main-45900-preview.surge.sh/version/main/guides/
|
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
5d2c22e
to
16e6154
Compare
There was a problem hiding this 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.
Status for workflow
|
Status for workflow
|
Part of #45446