-
Notifications
You must be signed in to change notification settings - Fork 13
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
Support named handlers #156 #210
Support named handlers #156 #210
Conversation
cbcc57a
to
bfb2bd1
Compare
Finally, as discussed with @rquinio1A, the config at named handler level will not default on the root level, but will be handled independently only reusing the root level defaulting values. There is no more config property duplications now. |
bfb2bd1
to
327ce54
Compare
It could indeed have been interesting that named handlers inherit their configuration from the root/default handler.
|
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.
There's the generated config included in the doc, but it could you add a small doc section under features (https://github.com/quarkiverse/quarkus-logging-splunk/blob/main/docs/modules/ROOT/pages/index.adoc#features) with an example config and typical code usage like in the unit test ?
Few points to highlights:
- Every handler is isolated and uses a separate Splunk client and connection pool, which means it has a cost.
- The configuration from the root handler are not inherited by named handlers.
- `quarkus.log.category."named-handler".use-parent-handlers=false is required if you do not want the root handler to also receive log events already sent to named handlers.
runtime/src/main/java/io/quarkiverse/logging/splunk/SplunkHandlerConfig.java
Outdated
Show resolved
Hide resolved
runtime/src/main/java/io/quarkiverse/logging/splunk/SplunkLogHandlerRecorder.java
Outdated
Show resolved
Hide resolved
327ce54
to
f232a2b
Compare
@treivize Thanks for the contribution! |
I guess named handlers are managed as expected with a defaulting for any config property to the root splunk configuration.
I was a bit sad about having had to duplicate the properties from the root level and the named handler ones, but I did not find how to customize the default value to detect in the recorder when to fetch the root value or the handler value when a default value is defined upfront. Any idea?
Fixes #156