'How to remove handlers from root logger
I want to set up centralized logging for my quarkus application and found this guide which recommends gelf as a tool to send messages to Logstash.
Enabling the gelf-handler does produce output, however the handler is immediately registered to the root-logger and I want to only specific loggers to log to gelf.
In short: I would something like this in my application.properties
quarkus.log.level=INFO
# This seems to not be possible
# quarkus.log.handlers=console,file
quarkus.log.category."org.acme".level=DEBUG
quarkus.log.category."org.acme".use-parent-handlers=true
quarkus.log.category."org.acme".handlers=gelf
quarkus.log.handler.gelf.enabled=true
quarkus.log.handler.gelf.host=tcp:localhost
quarkus.log.handler.gelf.port=12201
How can I achieve this effect?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
