-
Notifications
You must be signed in to change notification settings - Fork 2.7k
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
NamedLogHandlersBuildItem causes stderr "Handler is linked to a category but not configured" #45645
Comments
/cc @radcortez (config) |
I think it makes sense. Would you like to contribute that? |
@geoand I've done some debugging and the setup of categories is done twice:
So a naive fix would be to remove the first call. |
We need to set up the categories for build time, but we probably need to ignore the config for the named handlers. |
Makes sense |
Describe the bug
We've added support for named log handlers in quarkus-logging-splunk extension, thanks to Quarkus NamedLogHandlersBuildItem that was introduced in #7568
Our config looks like:
The extension builds one handler for every nested quarkus.log.handler.splunk."named-handler" config entries, and registers them at runtime init via NamedLogHandlersBuildItem.
Even though the log category and handler work properly, there's an stderr log at Quarkus startup:
LogManager error of type GENERIC_FAILURE: Handler with name 'MONITORING' is linked to a category but not configured.
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
Run https://github.com/quarkiverse/quarkus-logging-splunk/blob/main/deployment/src/test/java/io/quarkiverse/logging/splunk/LoggingSplunkNamedHandlerConfigTest.java
In the console stderr:
LogManager error of type GENERIC_FAILURE: Handler with name 'MONITORING' is linked to a category but not configured.
Output of
uname -a
orver
No response
Output of
java -version
No response
Quarkus version or git rev
3.15.2
Build tool (ie. output of
mvnw --version
orgradlew --version
)No response
Additional information
Intially reported in quarkiverse/quarkus-logging-splunk#319
This is reproducible with Quarkus 3.2, 3.8 and 3.15
The core handlers (console, file, ...) don't rely on NamedLogHandlersBuildItem , so I suspect the issue has always been present because it's not directly used in Quarkus itself.
Maybe the check on quarkus.log.category.handlers happens before NamedLogHandlersBuildItem are consumed ?
The text was updated successfully, but these errors were encountered: