quarkiverse / quarkus-logging-splunk

Quarkus extension to be able to send logs to a Splunk HTTP Event Collector
Apache License 2.0
11 stars 11 forks source link

Add quarkus.log.handler.splunk.filter #244

Closed rquinio1A closed 2 months ago

rquinio1A commented 5 months ago

Add a config entry for filtering log events in https://github.com/quarkiverse/quarkus-logging-splunk/blob/main/runtime/src/main/java/io/quarkiverse/logging/splunk/SplunkLogHandler.java#L17 and apply it to the ExtLogHandler.

Note: when in async mode, Quarkus logging extensions register filters on the async thread rather than on the AsyncHandler, meaning filters cannot access RequestScope beans (https://github.com/quarkusio/quarkus/issues/37334)

rquinio1A commented 5 months ago

This is for per-handler filters. In practice, global filters are probably more useful, but there's no way to do it via configuration on categories cf https://github.com/quarkusio/quarkus/issues/32998 . There's an example of programatic registration at startup though.